Can !pragma still be used to pass on Graphviz settings?

0 votes
asked Dec 11, 2020 in Question / help by fred (540 points)


Is the !pragma directive still usable to pass on specific attributes to Graphviz?


I was trying to use the following pragma in order to pack unrelated states nicely without having to add hidden transitions:

!pragma graphattributes packmode=<packMode>;

with <packMode> selected from:

There seems to be a nice default for class diagrams (although one might sometimes want other kinds of packing):

and object diagrams:

but less so for state diagrams:

PlantUML diagram

Here is the corresponding code (which can also be obtained from the above picture or its URL):

state A
state B
state C
state D
state E
state F
state G

Note that this is a simplified example, and it could be argued that state diagrams should have at most one connected component. However, this question is also of interest for cases where we want to pass on other kinds of attributes to Graphviz.



Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.