# 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.

Set axes in 3d plot

`show`

command.

add a comment

1

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()
```

1

You 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.

1

That's probably what I would do at this point too. It would be great to have a nice axes option for 3d graphics.

See http://trac.sagemath.org/ticket/19442 for a belated followup ticket.

Asked: **
2012-05-23 09:57:23 -0500
**

Seen: **1,376 times**

Last updated: **May 24 '12**

Sagemath 8.0 and Sagemath 8.1 and Windows 10

Color parametric_plot3d by a rgb color rather than a colormap.

The tachyon object used for rendering plots

How to enforce limits to the x-axis in plots?

Combination of lambda function and plot3d(?)

plot3d not displaying - only says "Graphics3d Object"?!

How to find the full argument list of a built-in function?

How do i plot a piecewise function with functional constraints?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.