Graphviz - What is a valid style attribute?
Asked Answered
G

1

9

The Graphviz attributes documentation describes the style attribute but does not say what values it may hold:

Set style information for components of the graph. For cluster subgraphs, if style="filled", the cluster box's background is filled. If the default style attribute has been set for a component, an individual component can use style="" to revert to the normal default. For example, if the graph has

edge [style="invis"]

making all edges invisible, a specific edge can overrride this via:

a -> b [style=""]

Of course, the component can also explicitly set its style attribute to the desired value.

What is a valid style attribute in Graphviz?

Goodygoody answered 15/11, 2017 at 18:58 Comment(0)
G
10

If you look closely, the same documentation page also specifies a Type named style describing valid styles. Excerpt:

At present, the recognized style names are "dashed", "dotted", "solid", "invis" and "bold" for nodes and edges, "tapered" for edges only, and "filled", "striped", "wedged", "diagonals" and "rounded" for nodes only. The styles "filled", "striped" and "rounded" are recognized for clusters. The style "radial" is recognized for nodes, clusters and graphs, and indicates a radial-style gradient fill if applicable.

Goodygoody answered 15/11, 2017 at 18:58 Comment(2)
In dot it's legit to have a style that is both rounded and filled. I don't see any discussion of this issue here or in the docs.Cure
style="rounded,dotted" worked for me, which resulted in both dotted and rounded border of a node whith box shapeFranni

© 2022 - 2024 — McMap. All rights reserved.