The only thing I could think of trying is 'axis ij', but it made no difference.
You can customise the datatip. Right click on a datatip in the figure and go to 'edit text update function'. You can then edit the callback to return whatever you want in the output_txt variable.
> You can customise the datatip. Right click on a datatip in the figure and go to 'edit text update function'. You can then edit the callback to return whatever you want in the output_txt variable.
============
Thanks a lot (you too, Matt).
But this raises a few more questions (you'll have to bear with me, I don't do a lot of graphics programming and so I'm not very conversant with notions of events and callbacks).
The old call back function gets used whenever I open a new figure. How do I make it so that my custom callback is always used? How would I later restore the factory default?
Thanks again.
It turns out to be easy -- once you think of it. The poster
figured out his question. I'll document what he discovered when he said "nevermind --
I got it."
1) Select Data Cursor tool and click a point on your plot
2) Right click the tool and select "Edit Text Update Function"
3) On line 8 you will see an expression "output_txt = ... (pos(1),4)...
(pos(1),4)...
4) Change the ,4's to ,7's or whatever level of precision you need.
5) Save the file as "custom_cursor.m" (or whatever you like
6) Next time you need to use the cursor, repeat step 1, but then Right Click and
select "Select Text Update Function". Now select your custom_cursor.m and
you will have your customized cursor.
7) The cursor always returns to its default state. For now, I don't mind selecting custom_cursor every time I need one. I'll be happy to have a suggestion on how to permanently change the cursor if someone feels like making one.
*snip*
> I'll be happy to have a suggestion on how to permanently change the cursor
> if someone feels like making one.
Enable the data cursor using the DATACURSORMODE function and change the
Updatefcn property to use your custom text update function.
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/datacursormode.html
If you want to automatically enable data cursor mode with your custom
Updatefcn whenever you create a figure, set the default Figure CreateFcn to
call DATACURSORMODE as I described above.
--
Steve Lord
sl...@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
"Steven Lord" <sl...@mathworks.com> wrote in message <hd7ka5$lq$1...@fred.mathworks.com>...