How to implement new GraphViz attribute?

0 votes
asked Oct 23, 2013 in Wanted features by mbucc (300 points)

I'd like to implement the aspect attribute to see if it will better control the width Component diagrams (http://www.graphviz.org/content/attrs-test#daspect).

This attribute is supported in Graphviz 2.28.0.

Is it as simple as implementing a new SingleLineCommand (like CommandScale)?

1 Answer

0 votes
answered Oct 23, 2013 by plantuml (295,000 points)
selected Oct 23, 2013 by mbucc
 
Best answer

Since this is a very asked feature, we have patched PlantUML so that the !pragma directive allows to specify an aspect ratio.
You can download : https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

It was much simplier than creating a new command.

So for example, you can use:
@startuml
!pragma svek_trace on
!pragma aspect 2,5
 [component1]
 [component2]
@enduml


The "!pragma svek_trace on" line will create svek.dot/sveg.svg file on your machine so that you can check the result.
Tell us if it improves your diagrams, so that we can eventually add a real command (instead of using pragma).
 

commented Dec 11, 2020 by Marius
Note that this snippet now crashes PlantUML. Providing a single number of a number such as 2.5 (dot instead of comma) won't work.
...