From: Wonko The sane on
Hi, I have a beginners question and I am not even sure what to search for, making it difficult to look for already existing code.

I want to create a simple GUI with an somewhat interactive plot. By clicking and dragging the user shall be able to select a part of the plot, this part being marked somehow, like inversion of the colors for example. This behavior is typical for audio editing software.

Any suggestions how to aproach? I can only think of reading the mouse cursor and than plot a new plot over the current location, but this seems to be not very elegant.

Thanks for any ideas.

PS: I found an example on an old website, but unfortunately no description how its done:
http://dsp.ucsd.edu/students/present-students/mik/matlabgui/specanalyzer.gif