# What to do to save a plot from notebook?

Is it possible to export a plot, preferable in a vector format from a notebook?

What to do to save a plot from notebook?

Is it possible to export a plot, preferable in a vector format from a notebook?

add a comment

1

svg is a vector format:

```
sage: G = plot(sin(x), 0, 2*pi)
sage: G.save('filename.svg')
```

Other options are:

```
sage: G.save('filename.pdf')
sage: G.save('filename.png') # not a vector format
```

The files are saved in the present working directory (pwd):

```
sage: pwd
...
```

0

Yes

```
sage: G = Graphics() # an graphic
sage: G.save('my_file.pdf') # save in pdf format
sage: G.save('my_file.svg') # save in svg format
```

Asked: **
2017-11-17 02:24:37 -0500
**

Seen: **435 times**

Last updated: **Nov 20 '17**

Only one of two identical entries in the notebook gives graphics output for show()

Is it possible to add arrow to arc() or other predefined plot

How to make two plots on a different scale

Limiting the display range of a 3d plot

How to make pygraphviz and sage compatible?

How do I plot a function undefined in some areas?

practical documentation for sage; e.g. `%hide` and `%hideall`

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.