<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168915</link>
    <title>MATLAB Central Newsreader - change data format in plot window?</title>
    <description>Feed for thread: change data format in plot window?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 08 May 2008 13:26:27 -0400</pubDate>
      <title>Re: change data format in plot window?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168915#431040</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
"Holger Kirchhoff" &amp;lt;holkir@cs.tu-berlin.de&amp;gt; wrote in message &lt;br&gt;
news:fvuf1f$4g5$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I could imagine that other people had this problem, but I&lt;br&gt;
&amp;gt; did not find anything similar by using the newsgroup search:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is there a way to change the format the data is displayed in&lt;br&gt;
&amp;gt; the plot window? If I plot vectors with more than 10^5&lt;br&gt;
&amp;gt; elements and want to find out an exact index position by&lt;br&gt;
&amp;gt; zooming into the plot, the numeric format is limited to 4&lt;br&gt;
&amp;gt; digits after the decimal point (like the 'short e'-format in&lt;br&gt;
&amp;gt; the command window), and it is not directly possible to&lt;br&gt;
&amp;gt; determine the exact index of a data point.&lt;br&gt;
&amp;gt; This is especially annoying when you display vectors with&lt;br&gt;
&amp;gt; even more elements. E.g. a displayed index of "1.2345 x&lt;br&gt;
&amp;gt; 10^8" could be any index between 123450000 and 123459999.&lt;br&gt;
&lt;br&gt;
Use the zoom mode object's ActionPostCallback function to adjust the &lt;br&gt;
XTickLabel property of the axes after zooming.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/zoom.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/zoom.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
x = 1e5:1e4:3e5;&lt;br&gt;
y = (x/1e4)*5;&lt;br&gt;
plot(x, y);&lt;br&gt;
zoom('on');&lt;br&gt;
zM = zoom(gcf);&lt;br&gt;
set(zM, 'ActionPostCallback', ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@(figh, eventobj) set(eventobj.Axes, 'XTickLabel', ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sprintf('%5.3f|', get(eventobj.Axes, 'XTick'))));&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; If it is not possible to change the data format of the axes,&lt;br&gt;
&amp;gt; is it optionally possible to change the data format of the&lt;br&gt;
&amp;gt; data cursor? I know, that it is possible to export the value&lt;br&gt;
&amp;gt; of the data cursor to a workspace-variable and display it&lt;br&gt;
&amp;gt; there in your favorite format, but if you want to check many&lt;br&gt;
&amp;gt; data points quickly, this becomes very laborious.&lt;br&gt;
&lt;br&gt;
See the last example on the documentation page for DATACURSORMODE:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/datacursormode.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/datacursormode.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 08 May 2008 10:48:03 -0400</pubDate>
      <title>Re: change data format in plot window?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168915#431006</link>
      <author>helper </author>
      <description>"Holger Kirchhoff" &amp;lt;holkir@cs.tu-berlin.de&amp;gt; wrote in &lt;br&gt;
message &amp;lt;fvuf1f$4g5$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I could imagine that other people had this problem, but I&lt;br&gt;
&amp;gt; did not find anything similar by using the newsgroup &lt;br&gt;
search:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is there a way to change the format the data is displayed &lt;br&gt;
in&lt;br&gt;
&amp;gt; the plot window? If I plot vectors with more than 10^5&lt;br&gt;
&amp;gt; elements and want to find out an exact index position by&lt;br&gt;
&amp;gt; zooming into the plot, the numeric format is limited to 4&lt;br&gt;
&amp;gt; digits after the decimal point (like the 'short e'-format &lt;br&gt;
in&lt;br&gt;
&amp;gt; the command window), and it is not directly possible to&lt;br&gt;
&amp;gt; determine the exact index of a data point.&lt;br&gt;
&amp;gt; This is especially annoying when you display vectors with&lt;br&gt;
&amp;gt; even more elements. E.g. a displayed index of "1.2345 x&lt;br&gt;
&amp;gt; 10^8" could be any index between 123450000 and 123459999.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If it is not possible to change the data format of the &lt;br&gt;
axes,&lt;br&gt;
&amp;gt; is it optionally possible to change the data format of the&lt;br&gt;
&amp;gt; data cursor? I know, that it is possible to export the &lt;br&gt;
value&lt;br&gt;
&amp;gt; of the data cursor to a workspace-variable and display it&lt;br&gt;
&amp;gt; there in your favorite format, but if you want to check &lt;br&gt;
many&lt;br&gt;
&amp;gt; data points quickly, this becomes very laborious.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any suggestions?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Holger&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
After plotting your data, try this convoluted command which &lt;br&gt;
will print 15 decimal places in the data cursor:&lt;br&gt;
&lt;br&gt;
set(datacursormode,'UpdateFcn',@(Y,X){sprintf('X: %&lt;br&gt;
0.15f',X.Position(1)),sprintf('Y: %0.15f',X.Position(2))})&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 08 May 2008 08:53:03 -0400</pubDate>
      <title>change data format in plot window?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168915#430984</link>
      <author>Holger Kirchhoff</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I could imagine that other people had this problem, but I&lt;br&gt;
did not find anything similar by using the newsgroup search:&lt;br&gt;
&lt;br&gt;
Is there a way to change the format the data is displayed in&lt;br&gt;
the plot window? If I plot vectors with more than 10^5&lt;br&gt;
elements and want to find out an exact index position by&lt;br&gt;
zooming into the plot, the numeric format is limited to 4&lt;br&gt;
digits after the decimal point (like the 'short e'-format in&lt;br&gt;
the command window), and it is not directly possible to&lt;br&gt;
determine the exact index of a data point.&lt;br&gt;
This is especially annoying when you display vectors with&lt;br&gt;
even more elements. E.g. a displayed index of "1.2345 x&lt;br&gt;
10^8" could be any index between 123450000 and 123459999.&lt;br&gt;
&lt;br&gt;
If it is not possible to change the data format of the axes,&lt;br&gt;
is it optionally possible to change the data format of the&lt;br&gt;
data cursor? I know, that it is possible to export the value&lt;br&gt;
of the data cursor to a workspace-variable and display it&lt;br&gt;
there in your favorite format, but if you want to check many&lt;br&gt;
data points quickly, this becomes very laborious.&lt;br&gt;
&lt;br&gt;
Any suggestions?&lt;br&gt;
&lt;br&gt;
Holger&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
