Ask Your Question
0

How to save a 3d plot from sage cell

asked 2015-07-13 23:25:30 +0100

EPS gravatar image

I've used plot3d to draw a simple plot in sage cell, however when I right click on the image nothing happens. In fact, if I hold the right button I can rotate the image just like when I left click.

I'm using Mozilla Firefox on Ubuntu and don't know if (1) I can change the settings of the browser so that I can save the image simply by right clicking, or (2) there is an alternative way of saving one's work from sage cell.

PS Right click works fine with, say plot command. There should be a conflict between plot3d and my browser that I don't know how to fix.

Thanks in advance for any input.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-14 01:48:32 +0100

fidbc gravatar image

Perhaps it has to do with the viewer that the cell is using. You can ask sage to render a png for you which you will be able to save using, for example

P=point3d([0,0,0])
P.show(viewer='tachyon')

For more info you can check the sage manual.

edit flag offensive delete link more

Comments

@fidbc tachyon allows me to save the image but the problem is that it is static and I can't make any adjustments to the orientation of the image before saving.

EPS gravatar imageEPS ( 2015-07-14 05:30:59 +0100 )edit

I've had the same problem. You can do rotations and translations to get the view you want, but you can't set the viewpoint, unfortunately. I don't know what the future holds on this issue, but I think there is a ticket on it.

calc314 gravatar imagecalc314 ( 2015-07-14 22:44:33 +0100 )edit

@calc314 Thanks for your comment! Unfortunately I don't have enough points to upvote any answers/comments yet. Can I ask whether you've installed sage on your computer, and if yes, whether you've had the same problem with that version too. I just want to know whether by installing sage on my computer I can get around this issue.

EPS gravatar imageEPS ( 2015-07-15 23:48:01 +0100 )edit

If you have the installed version and run the notebook then you can use the JMol viewer to view, adjust and save as png.

fidbc gravatar imagefidbc ( 2015-07-16 01:03:21 +0100 )edit

Yes, the installed version does have the same issue, but as @fidbc said, the JMol viewer will allow you to grab a snapshot.

calc314 gravatar imagecalc314 ( 2015-07-23 23:24:27 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-13 23:25:30 +0100

Seen: 1,679 times

Last updated: Jul 14 '15