ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 20 Aug 2014 08:40:36 -0500How to Change Ticks for Y axis Only?http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/ I have a script plotting two numpy arrays using list_plot on semilogx scale. I am plotting angle on Y axis so I want 30/60/90 ticks, but I don't know how to change ticks on Y axis only without typing in anything about x axis. I can't find information about this on sage manual.Sat, 26 Jul 2014 16:07:48 -0500http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/Answer by Rongcui Dong for <p>I have a script plotting two numpy arrays using list_plot on semilogx scale. I am plotting angle on Y axis so I want 30/60/90 ticks, but I don't know how to change ticks on Y axis only without typing in anything about x axis. I can't find information about this on sage manual.</p>
http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/?answer=23597#post-id-23597OK, I solved it by adding
ticks=[None, 30]
to the arguments of plot. There is one example in 2D Plotting page on manual, but it does not say it changes the Y axis and that None does not change the axis. A little bit unclear.Sat, 26 Jul 2014 16:12:36 -0500http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/?answer=23597#post-id-23597Comment by kcrisman for <p>OK, I solved it by adding</p>
<pre><code> ticks=[None, 30]
</code></pre>
<p>to the arguments of plot. There is one example in 2D Plotting page on manual, but it does not say it changes the Y axis and that None does not change the axis. A little bit unclear.</p>
http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/?comment=23856#post-id-23856I've opened http://trac.sagemath.org/ticket/16857 for this.Wed, 20 Aug 2014 08:40:36 -0500http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/?comment=23856#post-id-23856Comment by kcrisman for <p>OK, I solved it by adding</p>
<pre><code> ticks=[None, 30]
</code></pre>
<p>to the arguments of plot. There is one example in 2D Plotting page on manual, but it does not say it changes the Y axis and that None does not change the axis. A little bit unclear.</p>
http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/?comment=23658#post-id-23658Good work! Can you suggest what a good example would be for adding to the manual? I agree that this is important to have clear.Fri, 01 Aug 2014 20:26:15 -0500http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/?comment=23658#post-id-23658Comment by Rongcui Dong for <p>OK, I solved it by adding</p>
<pre><code> ticks=[None, 30]
</code></pre>
<p>to the arguments of plot. There is one example in 2D Plotting page on manual, but it does not say it changes the Y axis and that None does not change the axis. A little bit unclear.</p>
http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/?comment=23852#post-id-23852For example(not tested),
xx = np.logspace(1,100,1000)
yy = np.linspace(-180,180,1000)
list_plot(xx,yy,scale=semilogx,ticks=[None, 30])Wed, 20 Aug 2014 08:04:39 -0500http://ask.sagemath.org/question/23596/how-to-change-ticks-for-y-axis-only/?comment=23852#post-id-23852