<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/166604</link>
    <title>MATLAB Central Newsreader - Suppress Plot Unit Modifiers</title>
    <description>Feed for thread: Suppress Plot Unit Modifiers</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by 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>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 29 Mar 2008 17:30:05 -0400</pubDate>
      <title>Suppress Plot Unit Modifiers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/166604#423493</link>
      <author>David Doria</author>
      <description>Sometimes when I make a plot, if the x tic values are 1000,&lt;br&gt;
2000 etc, it will show them as 1, 2, etc&lt;br&gt;
&lt;br&gt;
and then put &lt;br&gt;
x10^3&lt;br&gt;
&lt;br&gt;
in the bottom right of the plot.&lt;br&gt;
&lt;br&gt;
1) is there a way to set this location? It usually ends up&lt;br&gt;
in an awkward spot, I'd like it inline with the xlabel&lt;br&gt;
&lt;br&gt;
2) can you tell it &quot;dont put this unit modifier&quot;?&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
&lt;br&gt;
David</description>
    </item>
    <item>
      <pubDate>Sat, 29 Mar 2008 18:00:16 -0400</pubDate>
      <title>Re: Suppress Plot Unit Modifiers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/166604#423499</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fsluas$gr0$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;Sometimes when I make a plot, if the x tic values are 1000,&lt;br&gt;
&amp;gt;2000 etc, it will show them as 1, 2, etc&lt;br&gt;
&lt;br&gt;
&amp;gt;and then put &lt;br&gt;
&amp;gt;x10^3&lt;br&gt;
&lt;br&gt;
&amp;gt;in the bottom right of the plot.&lt;br&gt;
&lt;br&gt;
&amp;gt;1) is there a way to set this location? It usually ends up&lt;br&gt;
&amp;gt;in an awkward spot, I'd like it inline with the xlabel&lt;br&gt;
&lt;br&gt;
I do not know of any way to control the position. It is not in&lt;br&gt;
any property that I have been able to find.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt;2) can you tell it &quot;dont put this unit modifier&quot;?&lt;br&gt;
&lt;br&gt;
set(gca,'XTickLabel',num2str(get(gca,'XTick').'))&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;The whole history of civilization is strewn with creeds and&lt;br&gt;
&amp;nbsp;&amp;nbsp;institutions which were invaluable at first, and deadly&lt;br&gt;
&amp;nbsp;&amp;nbsp;afterwards.&quot;                                -- Walter Bagehot</description>
    </item>
    <item>
      <pubDate>Sat, 29 Mar 2008 18:25:03 -0400</pubDate>
      <title>Re: Suppress Plot Unit Modifiers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/166604#423502</link>
      <author>David Doria</author>
      <description>in this example:&lt;br&gt;
&lt;br&gt;
x=1:1e5;&lt;br&gt;
y=x.^2;&lt;br&gt;
plot(x,y)&lt;br&gt;
set(gca,'XTickLabel',num2str(get(gca,'XTick').'))&lt;br&gt;
&lt;br&gt;
the axis labels become the actual values (ie 90000, etc).&lt;br&gt;
&lt;br&gt;
Is there a way to extract the multiplier so you can divide&lt;br&gt;
by it and get just 9, etc. &lt;br&gt;
&lt;br&gt;
ie.&lt;br&gt;
&lt;br&gt;
set(gca,'XTickLabel',num2str(get(gca,'XTick').'./MULTIPLIER))&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
David</description>
    </item>
    <item>
      <pubDate>Sat, 29 Mar 2008 18:40:18 -0400</pubDate>
      <title>Re: Suppress Plot Unit Modifiers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/166604#423503</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fsm1hv$dhm$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;in this example:&lt;br&gt;
&lt;br&gt;
&amp;gt;x=1:1e5;&lt;br&gt;
&amp;gt;y=x.^2;&lt;br&gt;
&amp;gt;plot(x,y)&lt;br&gt;
&amp;gt;set(gca,'XTickLabel',num2str(get(gca,'XTick').'))&lt;br&gt;
&lt;br&gt;
&amp;gt;the axis labels become the actual values (ie 90000, etc).&lt;br&gt;
&lt;br&gt;
&amp;gt;Is there a way to extract the multiplier so you can divide&lt;br&gt;
&amp;gt;by it and get just 9, etc. &lt;br&gt;
&lt;br&gt;
xticks = get(gca,'XTick').';&lt;br&gt;
pow10 = 10^floor(log10(min(xticks(:))));&lt;br&gt;
set(gca,'XTickLabel',num2str(xticks ./ pow10));&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;Any sufficiently advanced bug is indistinguishable from a feature.&quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-- Rich Kulawiec</description>
    </item>
    <item>
      <pubDate>Sat, 29 Mar 2008 19:08:01 -0400</pubDate>
      <title>Re: Suppress Plot Unit Modifiers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/166604#423508</link>
      <author>David Doria</author>
      <description>well in this case since it starts at 0 I think we'd have to&lt;br&gt;
use max() instead of min(), but I was wondering if there was&lt;br&gt;
a more direct method to access what matlab has decided to be&lt;br&gt;
the best scale factor , ie&lt;br&gt;
&lt;br&gt;
get(gca, 'ScaleFactor') or something</description>
    </item>
    <item>
      <pubDate>Sun, 30 Mar 2008 03:13:18 -0400</pubDate>
      <title>Re: Suppress Plot Unit Modifiers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/166604#423549</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fsm42h$4gq$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;well in this case since it starts at 0 I think we'd have to&lt;br&gt;
&amp;gt;use max() instead of min(),&lt;br&gt;
&lt;br&gt;
But then if your data runs (say) 8000 9000 10000 11000&lt;br&gt;
then the output would be .8 .9 1 1.1 rather than 8 9 10 11 .&lt;br&gt;
You could take the min() of the non-zero values, perhaps.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt;but I was wondering if there was&lt;br&gt;
&amp;gt;a more direct method to access what matlab has decided to be&lt;br&gt;
&amp;gt;the best scale factor , ie&lt;br&gt;
&lt;br&gt;
&amp;gt;get(gca, 'ScaleFactor') or something&lt;br&gt;
&lt;br&gt;
If there is then it is undocumented and in some very hidden property.&lt;br&gt;
&lt;br&gt;
But if you have a plot that you know it has happened to, then&lt;br&gt;
you could get() the XTickLabel, str2double() the last of those,&lt;br&gt;
get() the XTick, take the last of those, divide by the computed label,&lt;br&gt;
and the result should be the scale factor that was involved.&lt;br&gt;
&lt;br&gt;
Hmmm, for that matter, &lt;br&gt;
&lt;br&gt;
set(gca, 'XTickLabel', get(gca, 'XTickLabel'))&lt;br&gt;
&lt;br&gt;
might work!&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;I think Walter was a very smart man.&quot;          -- Gene Autry</description>
    </item>
    <item>
      <pubDate>Sun, 30 Mar 2008 03:34:01 -0400</pubDate>
      <title>Re: Suppress Plot Unit Modifiers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/166604#423553</link>
      <author>David Doria</author>
      <description>haha good idea - that'll do it!</description>
    </item>
  </channel>
</rss>

