Change a distance between classes

+1 vote
asked May 17, 2013 in To be sorted by anonymous
Is it possible to change a distance between class rectangles or between a class rectange and a line on a class diagram? I have a big diagram and I don't want to decrease font size.

I have a suggestion to allow user to specify the position of an element. A file with positions is generated with graphviz. Then this file is saved and used to determine positions of the diagram elements. A user can change this file. Also a graphics diagram editor can be written to edit this file.

It is convenient to describe a diagram wihout mouse, but sometimes (for example, when a diagram is big) manual element placement may be useful.

1 Answer

+4 votes
answered May 17, 2013 by plantuml (295,000 points)

Hi,

You can use this undocumented feature:

@startuml
skinparam nodesep 10
skinparam ranksep 20
class Foo1
class Foo2
Foo3 *-- Foo1
@enduml

Value for node separation and rank separation are in pixel.

It's true that when diagram is big (or very big) manual placement could be useful. However and unfortunatly, this is againt PlantUML concept...

Could you publish or send us an example of your big diagram : maybe we could help you or improve PlantUML to better handle your diagram.

Regards,

Arnaud

commented Apr 6, 2023 by Nils Brugger
10 years later but now you actually get an answer :+1:

@startuml
' avoid problems with weird angles
skinparam linetype ortho
component ":inject" {
  [io.micronaut.inject.annotation] as inject.annotation1
}
component ":core-processor" {
  [io.micronaut.inject.annotation] as inject.annotation2
}
[:inject-java]
[:context-processor] as ":context-processor (new)"
[:context]
[JPMS app] ..> ":context-processor" : annotationProcessor (somehow)
[JPMS app] --> ":inject-java" : annotationProcessor
[JPMS app] --> ":context" : api
[JPMS app] ..> "inject.annotation1" : used by gencode
":context-processor" --> ":core-processor" : compileOnly
":inject-java" --> ":core-processor" : api
":context" -->":inject": implementation
":inject-java" ..> ":context" : loads SPI
":core-processor" --> ":inject" : api
note left of "inject.annotation1"
basically unchangeable since required by autogen code
end note
@enduml
...