Ask Your Question
0

What to do to save a plot from notebook?

asked 7 years ago

anonymous user

Anonymous

updated 7 years ago

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

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 7 years ago

Sébastien gravatar image

updated 7 years ago

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
...
Preview: (hide)
link
0

answered 7 years ago

vdelecroix gravatar image

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
Preview: (hide)
link

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: 7 years ago

Seen: 1,198 times

Last updated: Nov 20 '17