Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make multiple diagram in single page

I wonder if there is any way to make a plantuml two sequence diagram in single page side by side. I want to keep the same actor names in both diagram. Currently if I do something like below, it automatically combined into single sequence diagram.

@startuml
Bob -> Alice : hello
@enduml

@startuml
Bob -> Mark : Hi
@enduml

sample

But expected two sequence side by side

like image 975
Sazzad Hissain Khan Avatar asked Feb 08 '19 07:02

Sazzad Hissain Khan


People also ask

How do you put multiple graphs into one?

Hold down the "Ctrl" key and click the second chart, so that both charts are selected at the same time. Click the "Page Layout" tab and then click the "Group" button in the Arrange area of the ribbon. A large box will surround both charts at once.


1 Answers

newpage: The newpage keyword is used to split a diagram into several images.

@startuml

header SayHello
footer Page %page% of %lastpage%

Bob -> Alice : hello

newpage last page

Bob -> Mark : Hi

@enduml

Result:

enter image description here

Reference

You also could define a variable like "PAGE_SETTING" to decide whether on or off it.

@startuml

' seton demo
!define PAGE_SETTING newpage

header SayHello
footer Page %page% of %lastpage%

Bob -> Alice : hello

PAGE_SETTING

Bob -> Mark : Hi

@enduml

Result:

enter image description here

Reference:Macro definition

like image 62
Carson Avatar answered Oct 04 '22 02:10

Carson