# Howto output plot to pdf, eps or svg ?

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

Howto output plot to pdf, eps or svg ?

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

add a comment

17

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.

-1

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

Seen: **7,674 times**

Last updated: **Jul 11 '13**

Why does graph plotting crop so aggressively, and what is a work-around?

Plotting in sage 4.8 defaults to firefox, WHY?

Save plot in SVG with plain text strings

ERROR: An unexpected error occurred while tokenizing input

Is there a way to draw a graph using a specific embedding?

How do you plot solutions of an O.D.E?

TypeError: range() integer end argument expected, got sage.symbolic.expression.Expression.

why elliptic curve plot() the same in Q and QuadraticField()?

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.