On 11/28/2012 04:38 PM, Rogério Brito wrote:
Hi,
On Wed, Nov 28, 2012 at 5:25 AM, P Purkayastha<ppu...@gmail.com> wrote:
On 11/28/2012 01:43 PM, Rogério Brito wrote:
g = graphs.PetersenGraph()
g.plot().save('petersen.png') # generated OK
g.plot().save('petersen.pdf') # also generated OK
g.plot().save('petersen.svg') # not OK
The svg graph shows up fine when viewed in my file browser (as a thumbnail),
when viewed using display (from imagemagick),
I get the same results when I try to see the file with nautilus (my
current file browser) or with display/convert from imagemagick. I may
try graphicsmagick to see if there is any difference, but I'm not that
hopeful.
when viewed using feh (uses imlib2),
Just tried feh and it delegates seeing the file to chromium, with a
message on the terminal saying:
feh WARNING: ./petersen.svg - No Imlib2 loader for that file format
and when viewed using inkscape.
I posted what I see at:
http://www.ime.usp.br/~rbrito/petersen-graph/
I would be thankful for any help.
So, I suspect it is a problem with your viewer.
I wouldn't rule out anything. Just curious: if I understand it
correctly, the SVG file is generated with matplotlib. How can I try
the equivalent call above to matplotlib directly?
Thanks for the help so far,
Your svg file itself is corrupted. Can you check if you get the correct
svg figures if you plot using pyplot? Something like this:
import matplotlib.pyplot as plt
plt.plot(range(10), range(10), '-o')
plt.savefig('a.svg')
As for the actual matplotlib commands used, look at the commands used in
the source code:
p = graphs.PetersenGraph().plot()
p.save??
You can get the matplotlib object out of sage by doing
p = graphs.PetersenGraph().plot().matplotlib()
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.