Generating png using Graphviz 2.38.0 on Anaconda Python 2.7

When I do this:

G.draw ('file.png')

I have the following error:

Format: "png" is not recognized. Use one of: cmapx cmapx_np dot eps fig gv imap imap_np ismap pic plain plain-ext pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2 xdot1.4

I tried to run

dot -c

      

It does not change anything.

To install (or reinstall) Graphviz I used:

conda install -c https://conda.binstar.org/mutirri graphviz

Point output -v

render      :  dot fig map pic pov ps svg tk vml xdot
layout      :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout  :
device      :  canon cmap cmapx cmapx_np dot eps fig gv imap imap_np ismap pic plain plain-ext pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2 xdot1.4
loadimage   :  (lib) eps gif jpe jpeg jpg png ps svg

      

An example that doesn't work:

import pygraphviz as pgv
G=pgv.AGraph(strict=False,directed=False)
G.add_edge('A','B')
G.layout(prog='neato')
G.draw('graph.png')

      

If I replace png with svg this example works.

+3
python graphviz ipython-notebook pygraphviz


source to share


No one has answered this question yet

Check out similar questions:

5504
Does Python have a ternary conditional operator?
5231
What are metaclasses in Python?
4473
Calling an external command in Python
3790
How can I safely create a subdirectory?
3602
Does Python have a substring method "contains"?
3119
What is the difference between Python list methods that are appended and expanded?
2818
Finding the index of an element by specifying the list that contains it in Python
2568
How to find the current time in Python
2
Graphviz sfdp worse in ubuntu compared to mac?
1
python: os.system doesn't execute shell command



All Articles
Loading...
X
Show
Funny
Dev
Pics