Code covered by the BSD License  

Highlights from
linkdatatips

4.0

4.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 3.18 KB File ID: #27266

linkdatatips

by Iram Weinstein

 

16 Apr 2010 (Updated 18 May 2010)

Creates and maintains linked datatips in all plots as the user moves around the first plot

| Watch this File

File Information
Description

I often find myself trying to compare the results of different functions z=f(x,y), using datatips in the plots. This function provides a way of exploring results in one plot while observing values in the other plots as well. Linkdtatips works with plots formed by image, imagesc, mesh,meshc, pcolor, surf and surfc.

Added feature. To shift the primary datatip focus to the kth plot, call again as linkdatatips(hg(k))
 

Linkdatatips is compatible with linkaxes.

EXAMPLE:
z = peaks(50);
figure
h(1) = imagesc(z);
figure
subplot 121
h(2) = surf(z.^2);
subplot 122
h(3)=mesh(z+3);
linkdatatips(h);

 

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
MAKEDATATIP

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
12 May 2010 Matt J

Pretty nice. It's about time someone figured out how to do this. My one wish would be that it be possible to trigger a linked datatip from any of the plots in the set, and not just fig(1). That way I wouldn't have to relaunch the function and reorder the input handles everytime I need a different image to serve as the reference.

23 Jun 2010 sukuchha shrestha

Very nice ! I need a helping hand from the author to modify the code such that it works also with imshow.

05 Aug 2010 Jason

Is there a work-around to use this function with a regular plot/subplot? I have 4-5 subplots of data time-histories and I would like to link datatips between the plots. The data are in simple arrays and are currently plotted using subplot(5,1,X); plot(...)

Please login to add a comment or rating.
Updates
20 Apr 2010

Added tags

18 May 2010

Added feature. To shift the primary datatip focus to the kth plot, call again as linkdatatips(hg(k))

Also, default behavior of the datatip is now SnapToDataVertex.

Tag Activity for this File
Tag Applied By Date/Time
datatips Iram Weinstein 19 Apr 2010 11:43:22
data exploration Iram Weinstein 19 Apr 2010 11:43:22
gui Iram Weinstein 19 Apr 2010 11:43:22
datatip Iram Weinstein 20 Apr 2010 10:39:17
data cursor Iram Weinstein 20 Apr 2010 10:39:18
data Iram Weinstein 20 Apr 2010 10:39:18

Contact us at files@mathworks.com