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.Tue, 20 Oct 2015 20:33:08 +0200Set axes in 3d plothttps://ask.sagemath.org/question/8997/set-axes-in-3d-plot/Is there a way to set the kind of axes shown in a 3d plot? Seems like you should be able to specify boxed, axes, etc. in the `show` command.Wed, 23 May 2012 16:57:23 +0200https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/Answer by kcrisman for <p>Is there a way to set the kind of axes shown in a 3d plot? Seems like you should be able to specify boxed, axes, etc. in the <code>show</code> command.</p>
https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?answer=13606#post-id-13606You can do `frame=False` and `axes=True`, but doubtless you're talking about something more substantial, and these leave ... less than desirable results. I'm not sure why the axes are in the wrong place sometimes, though I believe there is a ticket open for this.Wed, 23 May 2012 23:25:49 +0200https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?answer=13606#post-id-13606Comment by kcrisman for <p>You can do <code>frame=False</code> and <code>axes=True</code>, but doubtless you're talking about something more substantial, and these leave ... less than desirable results. I'm not sure why the axes are in the wrong place sometimes, though I believe there is a ticket open for this.</p>
https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?comment=30153#post-id-30153See http://trac.sagemath.org/ticket/19442 for a belated followup ticket.Tue, 20 Oct 2015 20:33:08 +0200https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?comment=30153#post-id-30153Comment by calc314 for <p>You can do <code>frame=False</code> and <code>axes=True</code>, but doubtless you're talking about something more substantial, and these leave ... less than desirable results. I'm not sure why the axes are in the wrong place sometimes, though I believe there is a ticket open for this.</p>
https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?comment=19746#post-id-19746Thanks for the help. I really went a few rounds with the plot3d options this afternoon and ended up using the line command to create some axes. Just wanted to make sure I hadn't missed something in the documentation somehow.Thu, 24 May 2012 00:25:29 +0200https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?comment=19746#post-id-19746Comment by Jason Grout for <p>You can do <code>frame=False</code> and <code>axes=True</code>, but doubtless you're talking about something more substantial, and these leave ... less than desirable results. I'm not sure why the axes are in the wrong place sometimes, though I believe there is a ticket open for this.</p>
https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?comment=19742#post-id-19742That's probably what I would do at this point too. It would be great to have a nice axes option for 3d graphics.Thu, 24 May 2012 13:10:09 +0200https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?comment=19742#post-id-19742Answer by ndomes for <p>Is there a way to set the kind of axes shown in a 3d plot? Seems like you should be able to specify boxed, axes, etc. in the <code>show</code> command.</p>
https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?answer=13611#post-id-13611
You can write your own python function to draw axes, something like:
def axes(xmin=-1,xmax=1,ymin=-1,ymax=1,zmin=-1,zmax=1,**kwds):
ex = vector((1,0,0))
ey = vector((0,1,0))
ez = vector((0,0,1))
G = line3d([xmin*ex,xmax*ex],**kwds)
G += line3d([ymin*ey,ymax*ey],**kwds)
G += line3d([zmin*ez,zmax*ez],**kwds)
return G
axes(xmax=2,zmax=4,color='red',thickness=2).show()Fri, 25 May 2012 05:39:41 +0200https://ask.sagemath.org/question/8997/set-axes-in-3d-plot/?answer=13611#post-id-13611