Code covered by the BSD License  

Highlights from
datalabel

4.94118

4.9 | 17 ratings Rate this file 12 Downloads (last 30 days) File Size: 3.43 KB File ID: #1542
image thumbnail

datalabel

by Scott Hirsch

 

25 Mar 2002 (Updated 06 Jan 2010)

Interactive labeling of data points on a plot.

| Watch this File

File Information
Description

Have you ever looked at a plot and said "what's the value of the curve at this point?" Were you frustrated that gpinut only told you where you clicked, not the actual data value?

Well, worry no more! With datalabel, a single click on a line labels the point with its (x,y) coordinates. But wait, there's more! You can label as many points as you want, on as many lines as you've got. You can move the labels. You can add markers to the labels. You can even delete the labels.

So, don't delay. Download datalabel now, before supplies run out!

Acknowledgements
This submission has inspired the following:
data_marker, Test and Measurement Seminar Demos
MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (19)
16 Jan 2003 Josef Nauderer

Usefull tool!!!!

16 Mar 2003 Lina Chang

This added feature is great! I've always wanted to be able to this to my plots.

17 Jul 2003 Luc Jonckheere

cool

23 Jul 2003 YaYa Huang

You are an excellent guy!!

12 Aug 2003 Mujahid Sultan

Simply superb! great work.

23 Sep 2003 Wong Yew Leong

Cool...just what we wanted!

23 Oct 2003 Andrey Loginov

Cool and easy to upgrade!
If you wish to get optional label backgrounds, text size, text color&style or even optional label position simply change input, store additional fields with "setappdata" and get them further with "getappdata".
It is also not difficult to modify code to get labels in between of XY line data points:).

18 Apr 2004 Keven Chang

Great Great Job.

More, Is possible to have a transparent.
Back Ground.

19 Nov 2004 Zahid Ullah Khan

Its Great... Thanks :-]

27 Mar 2005 Mo saggaf  
24 Apr 2005 Mo saggaf  
06 Dec 2005 Zhichao Ruan

great job

23 Jun 2007 Elias Bwick

Thanks dude. This is exactly what I was looking for. Excellent

17 Jan 2008 ma r

Thank you so much. This is perfect.

13 Mar 2008 Engin Masazade

Very useful, thanks a lot

23 Mar 2009 Akshay

Awesome!! Thanks!

17 Dec 2010 Juan Pedro

great

14 Mar 2011 Victor

Dear all,
I have a curve in 2d. Every point of this curve is correspond to another rows of a (n,3) matrix.
Is it possible with "datalabel" or do you know any other hint?
Thanks

27 Jan 2012 Robert Daly

For time series data you can get the 'x coordinate' as a date string by changing line 89 to ...
th = text(xv,yv,[' (' datestr(xv) ',' num2str(yv) ')']);

When you click on a feature it will tell you when it happened as a date and time rather than a cryptic matlab date number. One area where Excel seems to be better than Matlab (until now!).

Please login to add a comment or rating.
Updates
08 Apr 2002

Through discussions with our developers, I realized that this file has the same name as a file that will be included in R13 (the capabilities are different). Would it be possible to change the name to datalabel?

Thanks, Scott

15 May 2002

The text labels can now be moved relative to the data markers. This makes it easier to read labels that might have been obscured by other data.

06 Jun 2003

Add telemetry keyword.

26 Jan 2006

Bug fix: Now works on horizontal lines. Thanks to Robert Young for catching this and fixing the code!

06 Jan 2010

Update copyright

Tag Activity for this File
Tag Applied By Date/Time
annotation Scott Hirsch 22 Oct 2008 06:43:17
customization Scott Hirsch 22 Oct 2008 06:43:17
interactive Scott Hirsch 22 Oct 2008 06:43:17
plot Scott Hirsch 22 Oct 2008 06:43:17
label Scott Hirsch 22 Oct 2008 06:43:17
telemetry Scott Hirsch 22 Oct 2008 06:43:17
datatip Scott Hirsch 22 Oct 2008 06:43:17
tip Scott Hirsch 22 Oct 2008 06:43:17
data value Scott Hirsch 22 Oct 2008 06:43:17
data value Gurudevan 17 Nov 2008 00:40:36
annotation Zhao sam 29 Apr 2010 00:31:54

Contact us at files@mathworks.com