I am trying to create a directed graph with nodes of different filled colors. I have created a gv file like this:
digraph mentions {
"A" -> "B"
"A" -> "C"
"B" -> "C"
"B" -> "A"
"A" [shape=circle, style=filled, fillcolor=red]
"B" [shape=circle, style=filled, fillcolor=green]
"C" [shape=circle, style=filled, fillcolor=purple]
}
And my command line argument is:
ccomps -zX#0-1000 testGraphCalls.gv | \
grep "-" | cat <(echo "digraph mentions {") - <(echo "}") | \
sfdp -Gbgcolor=white -Ecolor=blue \
-Nwidth=1 -Nheight=1 -Nfixedsize=true \
-Nlabel='' -Earrowsize=0.4 -Gsize=75 -Gratio=fill \
-Tpng > test.png
However, the nodes of my white circles outlined in black. Any ideas of how I can get the nodes to fill properly?
If ordering="out" , then the outedges of a node, that is, edges with the node as its tail node, must appear left-to-right in the same order in which they are defined in the input. If ordering="in" , then the inedges of a node must appear left-to-right in the same order in which they are defined in the input.
Ranks and Subgraphs To work out the layout, Graphviz uses a system it calls "ranks". Each node is assigned a higher rank than the highest ranked node that point to it. If your rank direction is set to left to right ( rankdir=LR ), then nodes with a higher rank are placed further to the right.
How do I use graphviz to convert this into an image? For windows: dl the msi and install; Find gvedit.exe in your programs list; Open . dot file in question; Click running person on toolbar; Go to graph -> settings ; change Output file type to file type of your liking and press ok..
What is all the stuff in your command? When you grep for "-" in your .dv file, grep won't print the three attribute lines.
Do you have the program dot
, which you could use for a quick test of your graph file?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With