<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251</link>
    <title>MATLAB Central Newsreader - all axis tick labels with the same digits</title>
    <description>Feed for thread: all axis tick labels with the same digits</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>Wed, 29 Jul 2009 10:55:04 -0400</pubDate>
      <title>all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669059</link>
      <author>pietro </author>
      <description>How can i have axis tick labels with the same digit? instead [0 0.05 0.1 0.15 0.2] i would like [0.00 0.05 0.10 0.15 0.20] &lt;br&gt;
thank you in advance</description>
    </item>
    <item>
      <pubDate>Wed, 29 Jul 2009 11:14:01 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669063</link>
      <author>Wayne King</author>
      <description>Hi Pietro, How about&lt;br&gt;
&lt;br&gt;
x=[0 0.05 0.1 0.15 0.2];&lt;br&gt;
y=3*x;&lt;br&gt;
plot(x,y)&lt;br&gt;
set(gca,'xticklabel',{'0.00' '0.05' '0.10' '0.15' '0.20'});&lt;br&gt;
&lt;br&gt;
Wayne&lt;br&gt;
&lt;br&gt;
&quot;pietro &quot; &amp;lt;bracardi82@email.it&amp;gt; wrote in message &amp;lt;h4p9q8$bcu$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; How can i have axis tick labels with the same digit? instead [0 0.05 0.1 0.15 0.2] i would like [0.00 0.05 0.10 0.15 0.20] &lt;br&gt;
&amp;gt; thank you in advance</description>
    </item>
    <item>
      <pubDate>Wed, 29 Jul 2009 12:00:19 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669081</link>
      <author>pietro </author>
      <description>&quot;Wayne King&quot; &amp;lt;wmkingty@gmail.com&amp;gt; wrote in message &amp;lt;h4patp$mu3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi Pietro, How about&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; x=[0 0.05 0.1 0.15 0.2];&lt;br&gt;
&amp;gt; y=3*x;&lt;br&gt;
&amp;gt; plot(x,y)&lt;br&gt;
&amp;gt; set(gca,'xticklabel',{'0.00' '0.05' '0.10' '0.15' '0.20'});&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Wayne&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;pietro &quot; &amp;lt;bracardi82@email.it&amp;gt; wrote in message &amp;lt;h4p9q8$bcu$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; How can i have axis tick labels with the same digit? instead [0 0.05 0.1 0.15 0.2] i would like [0.00 0.05 0.10 0.15 0.20] &lt;br&gt;
&amp;gt; &amp;gt; thank you in advance&lt;br&gt;
&lt;br&gt;
i have too many and different graphs to do like this. Isn't there a function or a axis property? </description>
    </item>
    <item>
      <pubDate>Wed, 29 Jul 2009 13:24:26 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669116</link>
      <author>dpb</author>
      <description>pietro wrote:&lt;br&gt;
&amp;gt; &quot;Wayne King&quot; &amp;lt;wmkingty@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;h4patp$mu3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
...&lt;br&gt;
...&lt;br&gt;
&amp;gt;&amp;gt; set(gca,'xticklabel',{'0.00' '0.05' '0.10' '0.15' '0.20'});&lt;br&gt;
...&lt;br&gt;
&amp;gt; i have too many and different graphs to do like this. Isn't there a&lt;br&gt;
&amp;gt; function or a axis property?&lt;br&gt;
&lt;br&gt;
Unfortunately, no.  A pet peeve of mine as well; there's no way to set a &lt;br&gt;
format string for the automagically-generated numeric ticklabel values &lt;br&gt;
and the only way to manually set them is as an array of strings.&lt;br&gt;
&lt;br&gt;
Seems like they original coders would have at least had the sense to use &lt;br&gt;
a fixed-width format but they didn't and the annoying and ugly &quot;feature&quot; &lt;br&gt;
has never been fixed since the big bang day of handle graphics.... :(&lt;br&gt;
&lt;br&gt;
Maybe put in the feature request again--I did 10 years or more ago but &lt;br&gt;
I've no longer a supported version.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Wed, 29 Jul 2009 13:30:39 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669120</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;pietro &quot; &amp;lt;bracardi82@email.it&amp;gt; wrote in message &lt;br&gt;
news:h4pdki$e5b$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &quot;Wayne King&quot; &amp;lt;wmkingty@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;h4patp$mu3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; Hi Pietro, How about&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; x=[0 0.05 0.1 0.15 0.2];&lt;br&gt;
&amp;gt;&amp;gt; y=3*x;&lt;br&gt;
&amp;gt;&amp;gt; plot(x,y)&lt;br&gt;
&amp;gt;&amp;gt; set(gca,'xticklabel',{'0.00' '0.05' '0.10' '0.15' '0.20'});&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Wayne&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &quot;pietro &quot; &amp;lt;bracardi82@email.it&amp;gt; wrote in message &lt;br&gt;
&amp;gt;&amp;gt; &amp;lt;h4p9q8$bcu$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; How can i have axis tick labels with the same digit? instead [0 0.05 &lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; 0.1 0.15 0.2] i would like [0.00 0.05 0.10 0.15 0.20]&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; thank you in advance&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; i have too many and different graphs to do like this. Isn't there a &lt;br&gt;
&amp;gt; function or a axis property?&lt;br&gt;
&lt;br&gt;
Since I'm guessing you're objecting to the manual way Wayne constructed the &lt;br&gt;
tick label cell array, you can automate the formatting of the labels if the &lt;br&gt;
format you want is possible using the formatting specification in SPRINTF:&lt;br&gt;
&lt;br&gt;
x=[0 0.05 0.1 0.15 0.2];&lt;br&gt;
y=3*x;&lt;br&gt;
plot(x,y)&lt;br&gt;
set(gca, 'XTick', x, 'XTickLabel', sprintf('%0.2f|', x));&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
    <item>
      <pubDate>Wed, 29 Jul 2009 13:53:38 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669126</link>
      <author>dpb</author>
      <description>Steven Lord wrote:&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;gt; Since I'm guessing you're objecting to the manual way Wayne constructed the &lt;br&gt;
&amp;gt; tick label cell array, you can automate the formatting of the labels if the &lt;br&gt;
&amp;gt; format you want is possible using the formatting specification in SPRINTF:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; x=[0 0.05 0.1 0.15 0.2];&lt;br&gt;
&amp;gt; y=3*x;&lt;br&gt;
&amp;gt; plot(x,y)&lt;br&gt;
&amp;gt; set(gca, 'XTick', x, 'XTickLabel', sprintf('%0.2f|', x));&lt;br&gt;
&lt;br&gt;
Which brings up the &quot;pet peeve #27&quot; noted above (I came back to post &lt;br&gt;
this additional response as above which I intended to do but got too &lt;br&gt;
wrapped up in the moment... :) ) --&lt;br&gt;
&lt;br&gt;
Why can't the user have the ability to set that format or at least why &lt;br&gt;
doesn't presentation graphics have enough internal sense to make a &lt;br&gt;
neater-looking choice than the default?  Seems (and has always seemed) &lt;br&gt;
so obvious a minor little detail that would be so beneficial...&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Thu, 30 Jul 2009 11:13:01 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669390</link>
      <author>pietro </author>
      <description>&quot;Steven Lord&quot; &amp;lt;slord@mathworks.com&amp;gt; wrote in message &amp;lt;h4pith$kl4$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;pietro &quot; &amp;lt;bracardi82@email.it&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:h4pdki$e5b$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Wayne King&quot; &amp;lt;wmkingty@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;h4patp$mu3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Hi Pietro, How about&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; x=[0 0.05 0.1 0.15 0.2];&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; y=3*x;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; plot(x,y)&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; set(gca,'xticklabel',{'0.00' '0.05' '0.10' '0.15' '0.20'});&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Wayne&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &quot;pietro &quot; &amp;lt;bracardi82@email.it&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;lt;h4p9q8$bcu$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; How can i have axis tick labels with the same digit? instead [0 0.05 &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; 0.1 0.15 0.2] i would like [0.00 0.05 0.10 0.15 0.20]&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; thank you in advance&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; i have too many and different graphs to do like this. Isn't there a &lt;br&gt;
&amp;gt; &amp;gt; function or a axis property?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Since I'm guessing you're objecting to the manual way Wayne constructed the &lt;br&gt;
&amp;gt; tick label cell array, you can automate the formatting of the labels if the &lt;br&gt;
&amp;gt; format you want is possible using the formatting specification in SPRINTF:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; x=[0 0.05 0.1 0.15 0.2];&lt;br&gt;
&amp;gt; y=3*x;&lt;br&gt;
&amp;gt; plot(x,y)&lt;br&gt;
&amp;gt; set(gca, 'XTick', x, 'XTickLabel', sprintf('%0.2f|', x));&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; slord@mathworks.com &lt;br&gt;
&amp;gt; &lt;br&gt;
thank you very much, i was finding that.&lt;br&gt;
bye</description>
    </item>
    <item>
      <pubDate>Thu, 30 Jul 2009 15:00:09 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669472</link>
      <author>dpb</author>
      <description>pietro wrote:&lt;br&gt;
...&lt;br&gt;
&amp;gt;&amp;gt; Since I'm guessing you're objecting to the manual way Wayne constructed the &lt;br&gt;
&amp;gt;&amp;gt; tick label cell array, you can automate the formatting of the labels if the &lt;br&gt;
&amp;gt;&amp;gt; format you want is possible using the formatting specification in SPRINTF:&lt;br&gt;
...&lt;br&gt;
&amp;gt; thank you very much, i was finding that.&lt;br&gt;
&lt;br&gt;
I still think should submit enhancement request.  When I've made such &lt;br&gt;
submittals w/o a currently supported license they've pretty much gotten &lt;br&gt;
the brush off afaict...&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Thu, 30 Jul 2009 15:39:01 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669487</link>
      <author>Kelly Kearney</author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;h4scpu$4fh$1@news.eternal-september.org&amp;gt;...&lt;br&gt;
&amp;gt; pietro wrote:&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Since I'm guessing you're objecting to the manual way Wayne constructed the &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; tick label cell array, you can automate the formatting of the labels if the &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; format you want is possible using the formatting specification in SPRINTF:&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt; &amp;gt; thank you very much, i was finding that.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I still think should submit enhancement request.  When I've made such &lt;br&gt;
&amp;gt; submittals w/o a currently supported license they've pretty much gotten &lt;br&gt;
&amp;gt; the brush off afaict...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; --&lt;br&gt;
&lt;br&gt;
I agree that this is a feature I've always wanted.  Manually setting labels is a huge pain, especially if you plan to zoom, pan, change axis limits, etc.  I've written a function, tick2text, that allows you to assign a formatting string to ticks (and to do more slightly complicated formatting, like adding TeX strings) by changing them to text objects: &lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/16003&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/16003&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
However, this method is a bit limited in that I find myself having to work around manual changes to the axis.  For example:&lt;br&gt;
&lt;br&gt;
plot(rand(1,5));&lt;br&gt;
tick2text(gca, 'xformat', '%.2f');&lt;br&gt;
set(gca, 'xlim', [0 10]); % Ticks are wrong&lt;br&gt;
zoom(1); % Now ticks are good again&lt;br&gt;
&lt;br&gt;
Also, as I have it written write now, you have to fudge around with the buffer variables to figure out where ticks should be located with respect to your axes if you're using subplots.&lt;br&gt;
&lt;br&gt;
Having built-in support for formatting would be very nice.&lt;br&gt;
&lt;br&gt;
-Kelly</description>
    </item>
    <item>
      <pubDate>Thu, 30 Jul 2009 17:43:37 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669538</link>
      <author>dpb</author>
      <description>Kelly Kearney wrote:&lt;br&gt;
...&lt;br&gt;
&amp;gt; I agree that this is a feature I've always wanted. Manually setting&lt;br&gt;
labels is a huge pain, especially if you plan to zoom, pan, change axis&lt;br&gt;
limits, etc. ...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Having built-in support for formatting would be very nice.&lt;br&gt;
&lt;br&gt;
Good to have the file exchange workaround.&lt;br&gt;
&lt;br&gt;
Did you submit an enhancement request???&lt;br&gt;
&lt;br&gt;
I could try again, but I'm virtually positive I'd get same &quot;you're &lt;br&gt;
version is no longer under maintenance agreement, but if you'll spend &lt;br&gt;
several thousand dollars to update, we might consider it&quot; response I've &lt;br&gt;
gotten previously.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Thu, 30 Jul 2009 22:17:01 -0400</pubDate>
      <title>Re: all axis tick labels with the same digits</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/257251#669588</link>
      <author>Carlos Adrian Vargas Aguilera</author>
      <description>I'm totaly agree with all of you. I've just submit a function called ADDAXES, which I would like it to work with&lt;br&gt;
&lt;br&gt;
a) LOG scale &lt;br&gt;
b) exponential ticks (like in [1 2 3 4] x 10^3)&lt;br&gt;
c) LATEX TickLabels interpreter&lt;br&gt;
d) minor grid ticks&lt;br&gt;
&lt;br&gt;
but it is not possible, because there isn't handle for the axes TICKS, the little exponential text, and there is no way to get the minor-ticks (neither in 'linear' or 'log' scale).&lt;br&gt;
&lt;br&gt;
Besides,  Kelly Kearney is correct a workaround with the ZOOM and PAN functions should be made to update the ticks with the 'ActionPostCallback' functions, which (as far as I have tried) does not work correctly with the&lt;br&gt;
&lt;br&gt;
e) Double-click (for zoom out)&lt;br&gt;
&lt;br&gt;
Anyway, you can get the ADDAXES function at&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/24875&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/24875&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Carlos</description>
    </item>
  </channel>
</rss>

