Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dot: How to decorate graph nodes with black outline while filled with another color?

Tags:

graphviz

dot

I need help with formatting a dot graph. To simplify my question, I have a dot code here which I run through a dot tool:

digraph G
{
   TestNode [label="Test Node", shape="egg" style="filled" color="yellow"]
}

results in this:

enter image description here

I want to have a black outline to this node. How can I do that?

like image 680
bits Avatar asked Aug 23 '11 23:08

bits


1 Answers

Using fillcolor together with color does achieve what you're after:

TestNode [label="Test Node", shape="egg", style="filled", color="black", fillcolor="yellow"]

Graphviz node with outline

From the documentation:

Color used to fill the background of a node or cluster assuming style=filled. If fillcolor is not defined, color is used.

like image 102
marapet Avatar answered Sep 22 '22 05:09

marapet