5.0

5.0 | 4 ratings Rate this file 126 downloads (last 30 days) File Size: 3.63 KB File ID: #19877

MAKEDATATIP

by Tim Farajian

 

11 May 2008 (Updated 12 May 2008)

No BSD License  

Allows programmatically adding datatips to any valid graphical object.

Download Now | Watch this File

File Information
Description

MAKEDATATIP allows programmatically adding datatips to graphical objects.

Creation of this function was motivated because I was unable to find any simple built-in method. If there is a better method, I would love to know about it.

Note that this function was only tested in R2007b.

Example:
  x = 1:10;
  y = rand(1,10);
  hPlot = plot(x,y);
  makedatatip(hPlot,[3 8])

Example:
  [X,Y,Z] = peaks(30);
  hObj = surf(X,Y,Z);
  I = [5 8; 20 12; 22 28];
  hDatatip = makedatatip(hObj, I);

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
13 May 2008 John D'Errico

A nice idea. Good help, lots of examples, good error checking, an H1 line. Well done.

21 May 2008 Ben Kang

Very useful! Sometimes, it's hard to find and select exactly the point, especially for 3-D complex surface.

23 Jul 2008 Daphne W

Just what I was looking for on the Newsgroup a few months ago. Works perfectly on 2006b as well.
Thanks!

15 Apr 2009 Yan T

Very useful indeed. I don't know why Matlab itself doesn't provide this feature, I spent a lot of time searching the documentation for a way to do this.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
annotation Tim Farajian 22 Oct 2008 10:00:31
customization Tim Farajian 22 Oct 2008 10:00:31
data cursor Tim Farajian 22 Oct 2008 10:00:31
datacursor Tim Farajian 22 Oct 2008 10:00:31
data tip Tim Farajian 22 Oct 2008 10:00:31
datatip Tim Farajian 22 Oct 2008 10:00:31
programmatically Tim Farajian 22 Oct 2008 10:00:31
create Tim Farajian 22 Oct 2008 10:00:31
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com