Code covered by the BSD License  

Highlights from
custom datacursormode

4.0

4.0 | 2 ratings Rate this file 8 Downloads (last 30 days) File Size: 4.1 KB File ID: #8004
image thumbnail

custom datacursormode

by Phil Goddard

 

09 Jul 2005 (Updated 14 Jul 2005)

custom callback function for datacursormode to display value of all lines on a plot

Editor's Notes:

This file was a File Exchange Pick of the Week

| Watch this File

File Information
Description

This function implements a custom callback for datacursormode. It overrides the default functionality (that displays the x-y values of the last line selected) by adding a dragable vertical line and displaying the x-y values of all lines on an axis.

Note: Due to some issues with graphics listeners that this file does not deal with:
1. The title of the datacursormode display box shows the name of the last signal selected (rather than a generic title)
2. If changes are made to the legend, more lines are added to the axis, or the Display Style is changed from Datatip to Window Inside Figure, the user needs to turn datacursor mode off then back on again to see the correct display.

MATLAB release MATLAB 7.0.1 (R14SP1)
Other requirements The code was written with R14 SP2, but should work in R14 and above.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
22 Feb 2008 sp_sman as

it is very useful

29 Mar 2011 Imma

Very usefull. Can It be applied in horizontal mode?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
annotation Phil Goddard 22 Oct 2008 07:52:36
customization Phil Goddard 22 Oct 2008 07:52:36
datacursormode Phil Goddard 22 Oct 2008 07:52:36
values Phil Goddard 22 Oct 2008 07:52:36
data Phil Goddard 22 Oct 2008 07:52:36
plot Phil Goddard 22 Oct 2008 07:52:36
datacursormode David Silver 27 Jun 2009 12:27:18

Contact us at files@mathworks.com