axes labels in plot3d

327 views
Skip to first unread message

Diamantis

unread,
Oct 2, 2008, 11:05:36 PM10/2/08
to sage-support
Hi,
I recently installed sage (Ubuntu 8.04) as I think I am going to need
it for my PhD work. I was trying to make a 3d plot of a function, in
order to better understand a model, but what confuses me is that I
cannot find how to add labels on the axes. Any ideas?
Thank you very much.

William Stein

unread,
Oct 3, 2008, 12:11:34 AM10/3/08
to sage-s...@googlegroups.com

I think unfortunately nobody implemented that yet. You can work
around this by using the text3d command to explicitly place
a label, like this:

sage: var('x,y');
sage: plot3d(sin(x*y),(x,-1,1),(y,-2,2)) + text3d("X Axis",(0,-2,-1))

(When this feature is implemented, it will in fact be implemented by
just calling text3d.) I hope somebody will implement it; I doubt
it would be difficult.

- William

Erik Lane

unread,
Oct 3, 2008, 2:09:36 AM10/3/08
to sage-s...@googlegroups.com
If you right click on the 3d plot after it is made you can sort of add
in the axes. I say 'sort of' because they have never actually lined up
right where they are supposed to be. They go through the middle(ish)
of the box, but the x-y plane is displaced (for me) in the positive z
direction. You can look for yourself - right click, then click on
style, and check the 'axes' box.

So it's not perfect, but for me is quite a help at keeping oriented
with what is where when I'm looking at it. Though I'm not sure if it's
good enough for you needs.

Erik

Reply all
Reply to author
Forward
0 new messages