On Monday, February 24, 2014 1:18:00 AM UTC-6, P Purkayastha wrote: > > On 02/24/2014 12:22 PM, Evan Oman wrote: > > I am using Sage to make visual representations of Graphs(ie of the > vertex and edge variety) via the show command. > > > > 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! > > instead of show() simply use save(). You can give the same arguments to > save() as you give to show(), except for the first one - that should be > the filename, like > > plot(x).save('/tmp/a.pdf', <other show options>) > plot(x).save('./a.eps', <other show options>) > plot(x).save('./a.svg', <other show options>) > > If the latter two are done in a notebook cell, it will show a link to > the file. > > > > > 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. > > > > You should direct such requests to sage-support. >
Thanks for the redirect to sage-support! I will be using that for all future questions. As for this problem I am using the Graph module which doesn't seem to work with the save command. I tried the following: 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') and I got an *AssertionError *referring to a bunch of the matplotlib packages. The only way I have been able to save so far has been through saving the the outputted image via a right click in the browser. Is the Graph module incompatible with saving in this manner? -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.