Path: news.mathworks.com!not-for-mail
From: "Richard Sonnenfeld" <pcardout@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Data cursor coordinates -- increasing precision or number of decimal places
Date: Sat, 7 Nov 2009 19:05:03 +0000 (UTC)
Organization: New Mexico Inst of Mining &#38; Technology
Lines: 18
Message-ID: <hd4gcv$mmi$1@fred.mathworks.com>
References: <ha0j5l$n43$1@fred.mathworks.com> <ha0kj3$rkp$1@fred.mathworks.com> <ha0pms$bhc$1@fred.mathworks.com> <ha1t0f$s9l$1@fred.mathworks.com>
Reply-To: "Richard Sonnenfeld" <pcardout@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257620703 23250 172.30.248.37 (7 Nov 2009 19:05:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 7 Nov 2009 19:05:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 167855
Xref: news.mathworks.com comp.soft-sys.matlab:583253


I stumbled across the thread because I was looking for a way to change the
number of decimal digits (precision) displayed by the data cursor (or data-tip) as they
seem to call it.   Four digits is not necessarily enough for fine work.

 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.