Ask Your Question
9

Howto output plot to pdf, eps or svg ?

asked 2010-08-22 22:36:55 -0600

schilly gravatar image

Is it possible to output a plot to a pdf, eps or svg file? Does this work for all sorts of plots?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
16

answered 2010-08-22 23:19:02 -0600

Mike Hansen gravatar image

Yes, you can save plots to those formats. Here's an example

sage: p = plot(x^2, x)
sage: p.save('test.pdf')
sage: p.save('test.eps')
sage: p.save('test.svg')

It works for any of Sage's Graphics objects.

edit flag offensive delete link more

Comments

2

Just FYI - this doesn't work for 3d objects, which are not `Graphics` - docs say that it has to be PNG, BMP, GIF, PPM, or TIFF.

kcrisman gravatar imagekcrisman ( 2010-08-23 08:25:02 -0600 )edit
-1

answered 2013-07-03 17:48:25 -0600

Wheatley gravatar image

If the saveing function cannot work well, you can try to use a pdf converter control to transfer pdf to plot, beside to plot, pdf to html or image is also allowed..

edit remove flag flag offensive (1) delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2010-08-22 22:36:55 -0600

Seen: 6,614 times

Last updated: Jul 11 '13