ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 17 Nov 2017 09:59:51 +0100What to do to save a plot from notebook?https://ask.sagemath.org/question/39624/what-to-do-to-save-a-plot-from-notebook/Is it possible to export a plot, preferable in a vector format from a notebook?Fri, 17 Nov 2017 09:24:37 +0100https://ask.sagemath.org/question/39624/what-to-do-to-save-a-plot-from-notebook/Answer by vdelecroix for <p>Is it possible to export a plot, preferable in a vector format from a notebook?</p>
https://ask.sagemath.org/question/39624/what-to-do-to-save-a-plot-from-notebook/?answer=39629#post-id-39629Yes
sage: G = Graphics() # an graphic
sage: G.save('my_file.pdf') # save in pdf format
sage: G.save('my_file.svg') # save in svg formatFri, 17 Nov 2017 09:59:51 +0100https://ask.sagemath.org/question/39624/what-to-do-to-save-a-plot-from-notebook/?answer=39629#post-id-39629Answer by Sébastien for <p>Is it possible to export a plot, preferable in a vector format from a notebook?</p>
https://ask.sagemath.org/question/39624/what-to-do-to-save-a-plot-from-notebook/?answer=39627#post-id-39627svg 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
...Fri, 17 Nov 2017 09:39:29 +0100https://ask.sagemath.org/question/39624/what-to-do-to-save-a-plot-from-notebook/?answer=39627#post-id-39627