Skip to content

Instantly share code, notes, and snippets.

@bsorrentino
Last active July 29, 2022 16:05
Show Gist options
  • Save bsorrentino/7065bc2d2e853329581c89e91d09690e to your computer and use it in GitHub Desktop.
Save bsorrentino/7065bc2d2e853329581c89e91d09690e to your computer and use it in GitHub Desktop.
PlantUML Experience

PlantUML Experience

PlantUML in Docker

To install PlantUML for those platforms that do not provide its native packages see the following project plantuml-install

@Crashedmind wrote this guide as part of his own “Journey to Documentation as Code” using PlantUML as the main tools for proposing, analysing, documenting, maintaining software systems based on working with thousands of engineers across the globe.

Language

Mixing UML concepts in one graph

allow_mixing can be added to allow mixing UML concepts that are not supposed to be mixed. In the diagram below I am mixing components with classes.

Remove foot note

@startuml

hide footbox
java -jar plantuml.jar -encodesprite <gray level 4|8|16> <image>.png > <image>.sprite

import sprite into diagram

!include file.sprite

use sprite

to use sprite in diagram you can reference it using syntax: <$sprite_name,scale=scale factor,color=color>

Example

!include aibuilder.png.puml

rectangle "AI Model\n <$aibuilder,scale=.4,color=purple>" as AI #line.dashed

Use straight lines in diagram

Option are:

skinparam linetype polyline
skinparam linetype ortho

Diagram direction

Options are:

left to right direction
top to bottom direction

Hidden

text Direction
--[hidden]> hidden
-[hidden]d-> hidden with direction e.g. down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment