PlantUML tests

PlantUML site

  • Sequential diagram with Cerulean theme

PlantUML Syntax:
!include https://raw.githubusercontent.com/bschwarz/puml-themes/master/themes/cerulean/puml-theme-cerulean.puml<br />
Alice -> Bob: Authentication Request<br />
Bob –> Alice: Authentication Response</p>

  • Activity diagram with Cerulean-outline theme

PlantUML Syntax:
!include https://raw.githubusercontent.com/bschwarz/puml-themes/master/themes/cerulean-outline/puml-theme-cerulean-outline.puml<br />
start<br />
:Hello world;<br />
:This is defined on<br />
several **lines**;<br />
end</p>

  • Use Case diagram with Cyborg theme

PlantUML Syntax:
!include https://raw.githubusercontent.com/bschwarz/puml-themes/master/themes/cyborg/puml-theme-cyborg.puml<br />
User -> (Start)<br />
User –> (Use the application) : A small label</p>
<p>:Main Admin: —> (Use the application) : This is\nyet another\nlabel</p>

  • Class diagram with different types of connection and with Materia theme

PlantUML Syntax:
!include https://raw.githubusercontent.com/bschwarz/puml-themes/master/themes/materia/puml-theme-materia.puml<br />
Class09 — Class10<br />
Class07 .. Class08<br />
Class05 o– Class06<br />
Class03 *– Class04<br />
Class01 <|– Class02</p>

  • Component diagram with Cyber-outline theme

PlantUML Syntax:
!include https://raw.githubusercontent.com/bschwarz/puml-themes/master/themes/cyborg-outline/puml-theme-cyborg-outline.puml<br />
DataAccess – [First Component]
[First Component] ..> HTTP : use<br />
note right of [First Component]
A note can also<br />
be on several lines<br />
end note<br />
[Another component] as Comp2<br />
component Comp3<br />
component [Last\ncomponent] as Comp4</p>

  • State diagram

PlantUML Syntax:
[*] –> State1<br />
State1 –> [*]
State1 : this is a string<br />
State1 : this is another string</p>
<p>State1 -> State2<br />
State2 –> [*]

  • Object diagram

PlantUML Syntax:
object user</p>
<p>user : name = „Dummy“<br />
user : id = 123<br />

  • Deployment diagram

PlantUML Syntax:
cloud cloud1<br />
cloud cloud2<br />
cloud cloud3<br />
cloud cloud4<br />
cloud cloud5<br />
cloud1 -0- cloud2<br />
cloud1 -0)- cloud3<br />
cloud1 -(0- cloud4<br />
cloud1 -(0)- cloud5<br />

  • Wireframe diagram

PlantUML Syntax:
salt<br />
{<br />
Just plain text<br />
[This is my button]
() Unchecked radio<br />
(X) Checked radio<br />
[] Unchecked box<br />
[X] Checked box<br />
„Enter text here “<br />
^This is a droplist^<br />
}<br />

  • Flowchart diagram

PlantUML Syntax:
:Ready;<br />
:next(o)|<br />
:Receiving;<br />
split<br />
:nak(i)< :ack(o)><br />
split again<br />
:ack(i)< :next(o) on several lines| :i := i + 1] :ack(o)><br />
split again<br />
:err(i)< :nak(o)><br />
split again<br />
:foo/<br />
split again<br />
:i > 5}<br />
stop<br />
end split<br />
:finish;<br />

  • Timing diagram – Why not functioning?

PlantUML Syntax:
robust „Web Browser“ as WB<br />
concise „Web User“ as WU</p>
<p>@0<br />
WU is Idle<br />
WB is Idle</p>
<p>@100<br />
WU is Waiting<br />
WB is Processing</p>
<p>@300<br />
WB is Waiting</p>

  • Gantt diagram

PlantUML Syntax:
@startgantt<br />
[Task1] lasts 10 days<br />
then [Task2] lasts 4 days<br />
— Phase Two —<br />
then [Task3] lasts 5 days<br />
then [Task4] lasts 6 days<br />
@endgantt<br />

  • Mindmap diagram

PlantUML Syntax:
@startmindmap<br />
* Debian<br />
** Ubuntu<br />
*** Linux Mint<br />
*** Kubuntu<br />
*** Lubuntu<br />
*** KDE Neon<br />
** LMDE<br />
** SolydXK<br />
** SteamOS<br />
** Raspbian with a very long name<br />
*** Raspmbc => OSMC<br />
*** Raspyfi => Volumio<br />
@endmindmap<br />

  • Diataa diagram – the <pre> tag is needed!

PlantUML Syntax:
@startditaa
+--------+   +-------+   +-------+
|        +---+ ditaa +-->|       |
| Text   |   +-------+   |diagram|
|Document|   |!magic!|   |       |
|     {d}|   |       |   |       |
+---+----+   +-------+   +-------+
   :                         ^
   | Lots of work            |
   +-------------------------+
@endditaa

  • Another Ditaa diagram, another possibility

PlantUML Syntax:
@startuml
ditaa()
/--------\   +-------+
|cAAA    +---+Version|
|  Data  |   |   V3  |
|  Base  |   |cRED{d}|
|     {s}|   +-------+
\---+----/
@enduml

  • Another Ditaa diagram, another possibility

PlantUML Syntax:
@startuml
ditaa()
+-------------+-------------+
|cRED RED     |cBLU BLU     |
+-------------+-------------+
|cGRE GRE     |cPNK PNK     |
+-------------+-------------+
|cBLK BLK     |cYEL YEL     |
\-------------+-------------/
@enduml

  • Graphviz diagram – dot

PlantUML Syntax:
@startdot<br />
digraph foo {<br />
node [style=rounded]
node1 [shape=box]
node2 [fillcolor=yellow, style=“rounded,filled“, shape=diamond]
node3 [shape=record, label=“{ a | b | c }“]
<p>node1 -> node2 -> node3<br />
}<br />
@enddot<br />

  • Graphviz diagram – something more complex

PlantUML Syntax:
@startdot</p>
<p>digraph G {</p>
<p>subgraph cluster_0 {<br />
style=filled;<br />
color=lightgrey;<br />
node [style=filled,color=white];<br />
a0 -> a1 -> a2 -> a3;<br />
label = „process #1“;<br />
}</p>
<p>subgraph cluster_1 {<br />
node [style=filled];<br />
b0 -> b1 -> b2 -> b3;<br />
label = „process #2“;<br />
color=blue<br />
}<br />
start -> a0;<br />
start -> b0;<br />
a1 -> b3;<br />
b2 -> a3;<br />
a3 -> a0;<br />
a3 -> end;<br />
b3 -> end;</p>
<p>start [shape=Mdiamond];<br />
end [shape=Msquare];<br />
}</p>
<p>@enddot<br />

  • WBS diagram

PlantUML Syntax:
@startwbs<br />
* Business Process Modelling WBS<br />
** Launch the project<br />
*** Complete Stakeholder Research<br />
*** Initial Implementation Plan<br />
** Design phase<br />
*** Model of AsIs Processes Completed<br />
**** Model of AsIs Processes Completed1<br />
**** Model of AsIs Processes Completed2<br />
*** Measure AsIs performance metrics<br />
*** Identify Quick Wins<br />
** Complete innovate phase<br />
@endwbs<br />

  • Diagram with included math

PlantUML Syntax:
@startuml<br />
:<math>int_0^1f(x)dx</math>;<br />
:<math>x^2+y_1+z_12^34</math>;<br />
note right<br />
Try also<br />
<math>d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h</math><br />
<latex>P(y|\mathbf{x}) \mbox{ or } f(\mathbf{x})+\epsilon</latex><br />
end note<br />
@enduml<br />

  • Math

PlantUML Syntax:
@startmath<br />
f(t)=(a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L)<br />
@endmath<br />

  • Latex

PlantUML Syntax:
@startlatex<br />
\sum_{i=0}^{n-1} (a_i + b_i^2)<br />
@endlatex<br />

  • Archimate – not very well 🙁

PlantUML Syntax:

archimate #Technology

  • ER diagram

PlantUML Syntax:

' hide the spot
hide circle

' avoid problems with angled crows feet
skinparam linetype ortho

entity

  • Hand written diagram

PlantUML Syntax:
skinparam handwritten true<br />
Alice -> Bob : hello<br />
note right: Not validated yet<br />

  • Links can be used in diagrams

PlantUML Syntax:

actor Bob [[http://plantuml.com/sequence]]
actor

  • A special command dedicated to Steve Jobs and Steve Wozniak.

PlantUML Syntax:
apple II

  • Another charset

PlantUML Syntax:
<p>actor: standard ASCII<br />
actor: à á â ã ä å æ ç è é ê ë ì í î ï</p>

 

PlantUML Syntax:
xearth<br />

 

PlantUML Syntax:
<p>!pragma useNewPackage<br />
package net {<br />
class foo1<br />
}</p>
<p>package net::entities {<br />
class foo2<br />
}</p>
<p>package net::entities::sub {<br />
class foo3<br />
}</p>