Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Plot triggered by mouseover

Subject: Plot triggered by mouseover

From: Bill Campbell

Date: 6 Nov, 2012 21:26:08

Message: 1 of 2

I have a horizontal map of e.g. temperature, and use ginput to select a lat,lon and plot a vertical profile at that location in a separate figure. What I'd like is to have a figure that dynamically displays the profile wherever the mouse is, and freezes the plot when I click. So I can hover over the plot, see how the vertical profiles differ as I move the mouse over different locations, and click if the profile looks interesting.

Bill Campbell
Naval Research Laboratory
Monterey, CA

Subject: Plot triggered by mouseover

From: Yair Altman

Date: 7 Nov, 2012 07:07:08

Message: 2 of 2

"Bill Campbell" wrote in message <k7bv9g$7co$1@newscl01ah.mathworks.com>...
> I have a horizontal map of e.g. temperature, and use ginput to select a lat,lon and plot a vertical profile at that location in a separate figure. What I'd like is to have a figure that dynamically displays the profile wherever the mouse is, and freezes the plot when I click. So I can hover over the plot, see how the vertical profiles differ as I move the mouse over different locations, and click if the profile looks interesting.
>
> Bill Campbell
> Naval Research Laboratory
> Monterey, CA


My DataMatrix utility on the File Exchange should get you pretty close to what you describe. You should be able to easily adapt the code for your needs.
http://www.mathworks.com/matlabcentral/fileexchange/16181-datamatrix

Yair Altman
http://UndocumentedMatlab.com
 

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us