Ask Your Question
10

Howto output plot to pdf, eps or svg ?

asked 2010-08-23 05:36:55 +0100

Harald 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
18

answered 2010-08-23 06:19:02 +0100

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

3

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 15:25:02 +0100 )edit
0

answered 2013-07-04 00:48:25 +0100

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-23 05:36:55 +0100

Seen: 10,369 times

Last updated: Jul 12 '13