However as far as I can tell I can only save these as a raster in the form of a PNG or JPEG? I have been a vector graphic snob as of late and would like to save graphs as PDF like I can regular plots. Is this possible?
Thanks!
PS: I am not sure if this is an appropriate venue to post such a question, if this is the case let me know where I should direct my related inquirers.
graphObject = Graph({1:[2,3,4],2:[1,3,4],3:[1,2,4],4:[1,2,3]})
figure = graphObject.plot(layout="circular")
figure.save('./test.pdf')I used the Ubuntu PPA to install and the only additional package I installed was Pandas.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.
graphObject = Graph({1:[2,3,4],2:[1,3,4],3:[1,2,4],4:[1,2,3]})
figure = graphObject.plot(layout="circular")
figure.save('./test.pdf')Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_23.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Z3JhcGhPYmplY3QgPSBHcmFwaCh7MTpbMiwzLDRdLDI6WzEsMyw0XSwzOlsxLDIsNF0sNDpbMSwyLDNdfSkKZmlndXJlID0gZ3JhcGhPYmplY3QucGxvdChsYXlvdXQ9ImNpcmN1bGFyIikKZmlndXJlLnNhdmUoJy4vdGVzdC5wZGYnKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpUdblPn/___code___.py", line 5, in <module>
exec compile(u"figure.save('./test.pdf')" + '\n', '', 'single')
File "", line 1, in <module>
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 458, in wrapper
return func(*args, **kwds)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 2732, in save
transparent=transparent)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/figure.py", line 1370, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2055, in print_figure
**kwargs)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 1848, in print_pdf
return pdf.print_pdf(*args, **kwargs)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 2301, in print_pdf
self.figure.draw(renderer)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/figure.py", line 1006, in draw
func(*args)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/axes.py", line 2086, in draw
a.draw(renderer)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/collections.py", line 695, in draw
return Collection.draw(self, renderer)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/collections.py", line 259, in draw
self._offset_position)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 1548, in draw_path_collection
output(*self.gc.pop())
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 2093, in pop
assert self.parent is not None
AssertionError
Any thoughts?