ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 14 Feb 2013 00:17:18 +0100Disabling y-axes in 2-D plothttps://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/Hi all,
is it possible to switch of the y-axes seperately in a 2-D plot? The intuitive way
plot(exp,axes=[True,False])
is the very same as
plot(exp,axes=True)
Greetings,
MarkusWed, 13 Feb 2013 10:55:04 +0100https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/Comment by ppurka for <p>Hi all,</p>
<p>is it possible to switch of the y-axes seperately in a 2-D plot? The intuitive way</p>
<p>plot(exp,axes=[True,False])</p>
<p>is the very same as</p>
<p>plot(exp,axes=True)</p>
<p>Greetings,
Markus</p>
https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?comment=18235#post-id-18235I have put up a patch in [#14112](http://trac.sagemath.org/14112).Wed, 13 Feb 2013 21:20:49 +0100https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?comment=18235#post-id-18235Answer by achrzesz for <p>Hi all,</p>
<p>is it possible to switch of the y-axes seperately in a 2-D plot? The intuitive way</p>
<p>plot(exp,axes=[True,False])</p>
<p>is the very same as</p>
<p>plot(exp,axes=True)</p>
<p>Greetings,
Markus</p>
https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?answer=14536#post-id-14536In matplotlib you can use for example the link
http://www.shocksolution.com/2011/08/removing-an-axis-or-both-axes-from-a-matplotlib-plot/
In Sage you can use a workaround:
p=plot(sin,ticks=[0.2,[]],thickness=3,zorder=20)
p+=arrow((-1,0),(1,0),ticks=[0.2,[]],color='black',zorder=10)
p.axes_color('white')
p.show()Wed, 13 Feb 2013 12:18:39 +0100https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?answer=14536#post-id-14536Answer by pinwheel for <p>Hi all,</p>
<p>is it possible to switch of the y-axes seperately in a 2-D plot? The intuitive way</p>
<p>plot(exp,axes=[True,False])</p>
<p>is the very same as</p>
<p>plot(exp,axes=True)</p>
<p>Greetings,
Markus</p>
https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?answer=14545#post-id-14545The problem seems to be that I already have a very complicated plot, so I cannot apply matplotlib methods to that (at least I wouldnt know how).
The workaround you mentioned would be enough for me, but actually it doesnt work, because the white x-axes partly lies over the horizontal arrow and the y-axes lies over parts of the plot :/
I really thought that disabling axis seperately is a standard feature. Maybe I switch back to another CAS for this special plot :(
Thanks anyway for your answer.Wed, 13 Feb 2013 14:53:25 +0100https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?answer=14545#post-id-14545Comment by achrzesz for <p>The problem seems to be that I already have a very complicated plot, so I cannot apply matplotlib methods to that (at least I wouldnt know how).</p>
<p>The workaround you mentioned would be enough for me, but actually it doesnt work, because the white x-axes partly lies over the horizontal arrow and the y-axes lies over parts of the plot :/</p>
<p>I really thought that disabling axis seperately is a standard feature. Maybe I switch back to another CAS for this special plot :(</p>
<p>Thanks anyway for your answer.</p>
https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?comment=18232#post-id-18232O.K. I did.Thu, 14 Feb 2013 00:17:18 +0100https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?comment=18232#post-id-18232Comment by ppurka for <p>The problem seems to be that I already have a very complicated plot, so I cannot apply matplotlib methods to that (at least I wouldnt know how).</p>
<p>The workaround you mentioned would be enough for me, but actually it doesnt work, because the white x-axes partly lies over the horizontal arrow and the y-axes lies over parts of the plot :/</p>
<p>I really thought that disabling axis seperately is a standard feature. Maybe I switch back to another CAS for this special plot :(</p>
<p>Thanks anyway for your answer.</p>
https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?comment=18236#post-id-18236Change the zorder of your plot. Look at the difference between
plot(0)
plot(0, zorder=20)
The second one draws the plot above the axes.Wed, 13 Feb 2013 19:05:11 +0100https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?comment=18236#post-id-18236Comment by achrzesz for <p>The problem seems to be that I already have a very complicated plot, so I cannot apply matplotlib methods to that (at least I wouldnt know how).</p>
<p>The workaround you mentioned would be enough for me, but actually it doesnt work, because the white x-axes partly lies over the horizontal arrow and the y-axes lies over parts of the plot :/</p>
<p>I really thought that disabling axis seperately is a standard feature. Maybe I switch back to another CAS for this special plot :(</p>
<p>Thanks anyway for your answer.</p>
https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?comment=18237#post-id-18237Try the edited version aboveWed, 13 Feb 2013 15:48:47 +0100https://ask.sagemath.org/question/9803/disabling-y-axes-in-2-d-plot/?comment=18237#post-id-18237