Graphviz/Dot - how to mark all leaves in a tree with a distinctive color?

前端 未结 1 1737
感动是毒
感动是毒 2021-01-03 08:49

I have a script which prints a graph as .dot file. I would like to highlight all vertices of different degree with distinctive colors. Is it possible with Graphviz?

相关标签:
1条回答
  • 2021-01-03 09:40

    Try the graphviz utility gvpr for writing graph scripts. In particular,

    gvpr -c 'N[degree==1]{color="red"}'

    You can enhance this to define an array (or associative map) and look up color[$.degree]

    Stephen North

    0 讨论(0)
提交回复
热议问题