Graphics |
Enabling Data Cursor Mode
Select the data cursor icon in the figure toolbar or select the Data Cursor item in the Tools menu.
Once data cursor mode is enabled, clicking the mouse on a line or other graph object returns the data value of the point clicked. For example, in the following picture, the black square is the point selected and the values are displayed in the data tip next to the point.
Moving the Marker
You can move the marker using the arrow keys and the mouse. The up and right arrows move the marker to data points having greater index values in the data arrays. The down and left arrow keys move the marker to data points having lesser index values.
Positioning the Datatip Text Box
You can position the data tip text box in any one of four positions with respect to the data point: upper right (the default), upper left, lower left, and lower right.
To position the datatip, press, but do not release the mouse button while over the datatip text box and drag it to one of the four positions.
You can move a datatip using the arrow keys as well as the mouse.
Dragging the Datatip to Different Locations
You can drag the datatip to different locations on the graph object by clicking down on the datatip and dragging the mouse. You can also use the arrow keys to move the datatip.
Datatips on Image Objects
Datatips on images display the x- and y-coordinates as well as the RGB values.
Datatips on 3-D Objects
You can use datatips to read data points on 3-D graphs as well. In 3-D views, data tips display the x-, y- and z-coordinates.
Creating Multiple Data Tips
Normally, there is only one datatip displayed at one time. However, you can display multiple datatips simultaneously on a graph. This is a simple way to annotate a number of points on a graph.
Use the following procedure to create multiple datatips.
Customizing Data Cursor Text
You can customize the text displayed by the data cursor using the datacursormode
function. See the Examples section of the datacursormode
reference page for more information.
Deleting Datatips
You can remove the most recently added datatip or all datatips. When in data cursor mode, right-click to display the context menu.
Data Cursor -- Displaying Data Values Interactively | Display Style -- Datatip or Cursor Window |
© 1994-2005 The MathWorks, Inc.