Force UML output to grow vertically instead of horizontally

+1 vote
asked Feb 10, 2020 in Question / help by msawye16 (140 points)
Apologies if this is covered in the documentation but I have not been able to find anything.

PlantUML class diagrams tend to grow horizontally.

I am dealing with a large UML diagram and I would like to "encourage" the diagram to grow vertically.

Any help will be appreciated.

Thanks,

Mark
commented Feb 18, 2020 by Magnus
Hi,

I have same problem with a component diagram. Have some 50 components with some 100:s of associations. Try to structure the diagram using packages and force packages to line up vertically. Everything nice and tidy as long as I only have the packages, but the more components I add, and the more associations there is, the more horizontal distribution I get, despite only using the "double dash" notation.

Would somehow like a way to have priority for relations between structure elements, now all relations seems to be prioritized equally.

/Magnus

1 Answer

+1 vote
answered Feb 11, 2020 by Serge Wenger Work (15,620 points)

Hello,

With "-" diagram grows horizonzally. With "--" vertically. It is general in PlantUML. For example:

@startuml
class A
Class B
Class C
Class D
A <|- B
B <|-- C
C<|-- D
@enduml

You can find in the doc :https://plantuml.com/en/use-case-diagram Changing arrows direction

commented Feb 11, 2020 by msawye16 (140 points)

I've been a PlantUML user for many years and I am embarrassed to say that I did not know about the differences between single and double dashes

surprise

Thanks for the tip ...

/mbs

commented Feb 12, 2020 by Serge Wenger Work (15,620 points)
You are welcome
commented Feb 12, 2020 by albert (3,520 points)
You were not alone on the difference between "-" and "--"
commented Feb 12, 2020 by msawye16 (140 points)

A well kept secret wink

...