Updated 29 Oct 2013
Datum Cursor (DTMCURSOR) provides a graphical evaluation tool that produces a crosshair that displays its location in a figure annotation for quick inspection of data values. The user can also define x and/or y datums and measurement lines to calculate differences quickly. The difference is displayed either above or to the right of each measurement line. All text objects, except for datum labels, can be re-positioned via mouse. Changing datum location causes all measurements to update. Delta_y text font and edge color is the color of the line that you added a measurement to. Datums and measurement lines are draggable. I've tried to blend all the best of what I've learned from the submissions that inspired me. Many great features... give it a try. I hope you will find it to be "the" tool for data exploration.
Jonathan Lister (2023). dtmcursor (https://www.mathworks.com/matlabcentral/fileexchange/42675-dtmcursor), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- MATLAB > Graphics > 2-D and 3-D Plots > Polar Plots >
Inspired by: plot crosshairs, dualcursor, Graphical data selection tool, Display Cursor Location
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Added ability to export datum and measurement line locations to the base work space as vectors x_pos and y_pos.
Cursors can snap to data... delta-y can change color, added static methods, case insensitive parameter value pair input.
Added Keypress commands to control SnapToNearest and crosshair visability. Made datums and measurement lines draggable. Changed the default line and edge colors to red. Changed the default line style to solid.
corrected some comments in the file
Added many new properties, all text except for datum labels can be re-positioned via mouse. SnapToNearest causes the crosshair to be constrained to the closest line value. Use set(obj,'SnapToNearest',false) to turn that feature off.
Added labels to the X and Y datums. I had a dependency on a function called "draggable" that I eliminated. Cursor and delta value text can now be re-positioned by dragging with mouse.