You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for an amazing tool which I have been using in anger over the years. Presently I am working with what I'd call fairly large class diagrams, and PlantUML is able to render them without breaking a sweat, which is fantastic. The only slight downside is that the layout I am getting is not the most readable. I decided to open this issue to see if I can improve on the output.
Problem
The key problem I have is that all of my namespaces are being added to the right of each other. The following zoomed in picture should give you an idea of the problem:
The full source is available here [1]. The diagram continues far into the left. Interestingly, some namespaces appear below others, but on the main, they are to the right of each other. I also tried adding relationships between namespaces to see if they would get placed above each other but it seems the layout engine ignores these hints. They seem to work well in diagrams with few classes, but my diagrams have many hundreds of elements and, to the layperson, that seems to have an impact in the layout engine's ability to perform layouts.
I have a similar problem with regards to classes. I noticed that in same cases the layout engine does "cluster" classes rather than group them in a rectangle:
My sample size is small, but it seems to correlate with class width.
Questions
Is there a way to "force" placement of unrelated elements to be more like a "square" than a very wide "rectangle"?
do hidden relations between elements such as namespaces stop working when there are very large numbers of elements in a diagram?
Any other tips that may help with the layout of larger class diagrams are appreciated.
Material Consulted
I have consulted several sources with regards to layouts and whilst there are many interesting approaches, I haven't yet bumped into one that fits my needs. Before I progress I'll list the materials that I have consulted in case they are helpful to anyone else:
Section "Help on layout" in manual [2]
Using ELK layout engine [3]
using hidden relationships (also in manual)
"The Hitchhiker's Guide to PlantUML", section 6. "Layout" [4]
"PlantUML layout and styles tutorial" [5]
"PlantUML GraphViz Layout" [6]
Some of these documents have improved my diagrams but did not solve my general problems.
The text was updated successfully, but these errors were encountered:
mcraveiro
changed the title
Class diagrams: attaining a more "square-like" use of space in large diagrams
Class diagrams: how to make best use of space in large diagrams
Nov 12, 2022
Hi PlantUML developers,
Thanks for an amazing tool which I have been using in anger over the years. Presently I am working with what I'd call fairly large class diagrams, and PlantUML is able to render them without breaking a sweat, which is fantastic. The only slight downside is that the layout I am getting is not the most readable. I decided to open this issue to see if I can improve on the output.
Problem
The key problem I have is that all of my namespaces are being added to the right of each other. The following zoomed in picture should give you an idea of the problem:
The full source is available here [1]. The diagram continues far into the left. Interestingly, some namespaces appear below others, but on the main, they are to the right of each other. I also tried adding relationships between namespaces to see if they would get placed above each other but it seems the layout engine ignores these hints. They seem to work well in diagrams with few classes, but my diagrams have many hundreds of elements and, to the layperson, that seems to have an impact in the layout engine's ability to perform layouts.
I have a similar problem with regards to classes. I noticed that in same cases the layout engine does "cluster" classes rather than group them in a rectangle:
My sample size is small, but it seems to correlate with class width.
Questions
Any other tips that may help with the layout of larger class diagrams are appreciated.
Material Consulted
I have consulted several sources with regards to layouts and whilst there are many interesting approaches, I haven't yet bumped into one that fits my needs. Before I progress I'll list the materials that I have consulted in case they are helpful to anyone else:
Some of these documents have improved my diagrams but did not solve my general problems.
Many thanks for your time.
[1] https://raw.githubusercontent.com/MASD-Project/dogen/master/projects/dogen.text/modeling/dogen.text.svg
[2] https://plantuml.com/class-diagram
[3] https://plantuml.com/elk
[4] https://crashedmind.github.io/PlantUMLHitchhikersGuide/layout/layout.html
[5] https://www.augmentedmind.de/2021/01/17/plantuml-layout-tutorial-styles/
[6] https://isgb.otago.ac.nz/infosci/mark.george/Wiki/wiki/PlantUML%20GraphViz%20Layout
The text was updated successfully, but these errors were encountered: