Wednesday, July 10, 2019

PlantUML tricks


I've bee using plantuml a lot to draw various diagrams.  Here are a few tricks I've picked up.

Increase the size of the image

# define PLANTUML_LIMIT_SIZE to increase max size
java -DPLANTUML_LIMIT_SIZE=1024000 -jar plantuml.jar > png

Reading from pipe

grep “xxx” puml | java -jar plantuml.jar -pipe > png

Increase node separation or rank separation

@startuml
skinparam nodesep 10
skinparam ranksep 20

Notes on the same rank

@startuml
!pragma teoz true
note over a: hi
/ note over b: yea
/ note over c: yo
a -> b: x
& b -> c: y
@enduml

Arrows on the same rank

@startuml
!pragma teoz true
a -> b: x
& b -> c: y
@enduml

Rank is set automatically based on line length.

->  is same rank

--> is one rank lower

---> is 2 rank lowers

You can use -[norank]> to create arrows between nodes that will be always on same rank independent of length.


1 comment:

  1. How to Bet on Casino - TrickTactoe
    Casino games include 프랑스 리그1 순위 a 축구 해외 배당 selection of 파이어폭스 https 우회 a couple of basic casino games like Slots, Blackjack and Video fx 마진 거래 사이트 Poker. The game is 깡 도메인 easy to understand,

    ReplyDelete