Visualization options reference
pyfcstm plantuml and pyfcstm visualize share the same PlantUML source
configuration. plantuml stops after writing PlantUML source. visualize
uses the same source configuration, then renders an image or PDF through a
PlantUML backend. Use Visualization tasks for task recipes and
this page for exact option facts.
The synchronization markers below are comments consumed by
tools/check_visualization_reference_docs.py. They cover every
PlantUMLOptions field plus CLI renderer, type, environment, parser, and
failure-boundary facts.
Mental model
Visualization has two independent layers:
PlantUML source layer.
PlantUMLOptionsdecides which model facts are visible in the generated PlantUML text: variables, lifecycle actions, guards, effects, events, state labels, hierarchy depth, and styling.Rendered artifact layer.
visualizechooses a renderer backend, file type, output path, and viewer behavior. These settings do not change the model facts in the PlantUML source; they only decide how the source becomespng,svg, orpdf.
Reference-grade option scenarios
The reference tables below are exhaustive by field, but field rows alone do not show how options combine. These scenarios pin the most common combinations to observable outcomes and failure boundaries.
Scenario |
Example |
Expected effect |
Boundary or counterexample |
|---|---|---|---|
Preset-only source export. |
|
Uses the |
Passing |
Preset plus narrow override. |
|
Keeps full visibility while limiting each action block to three visible lines. |
|
Event-oriented diagram. |
|
Shows events directly in transitions and in event-supporting visual structures. |
Invalid enum values fail during option parsing before a renderer is called. |
Headless render. |
|
Writes an SVG and skips desktop viewer launch. |
Without |
Local renderer privacy. |
|
Keeps PlantUML source on the local machine when Java and the jar are available. |
Missing jar or Java is a local backend failure, not a model or PlantUML-option failure. |
Remote renderer convenience. |
|
Sends PlantUML source to the configured remote host and writes the rendered artifact. |
Do not use for private diagrams unless sending the source to that host is acceptable. |
Detail presets
The -l / --level CLI option maps to PlantUMLOptions.detail_level.
Use it for the main audience choice, then add -c key=value overrides only
for specific deviations.
Preset |
Resolved defaults |
Best use |
|---|---|---|
|
Shows variable definitions, transition guards, transition effects, and events. Hides lifecycle actions and pseudo-state styling. |
Presentations and architecture views where state shape matters more than implementation detail. |
|
Shows variable definitions, transition guards, transition effects, events, and pseudo-state styling. Hides lifecycle actions. |
General documentation, code review, and quick model understanding. |
|
Shows variable definitions, lifecycle actions, transition guards, transition effects, events, and pseudo-state styling. |
Deep debugging, semantic review, and generated-runtime alignment discussion. |
Preset examples:
pyfcstm plantuml -i machine.fcstm -l minimal -o machine.minimal.puml
pyfcstm plantuml -i machine.fcstm -l normal -o machine.normal.puml
pyfcstm plantuml -i machine.fcstm -l full -o machine.full.puml
PlantUML option fields
Options with default None are resolved by PlantUMLOptions.to_config().
Resolution order is: explicit value, parent switch, detail preset, then final
fallback. Parent switches are especially important for lifecycle actions:
show_enter_actions, show_during_actions, show_exit_actions,
show_aspect_actions, show_abstract_actions, and
show_concrete_actions inherit from show_lifecycle_actions when they are
None.
Field |
CLI form |
Default |
Values |
Effect and notes |
|---|---|---|---|---|
|
|
|
|
Main preset. Use |
|
|
|
bool or |
Show the |
|
|
|
|
Choose whether variables appear as a PlantUML note, a legend table, or not at all. |
|
|
|
|
Position for variable legends. Quote the shell argument when the value contains a space. |
|
|
|
tuple of |
Components for state labels. The first visible component is primary; additional components appear in parentheses. |
|
|
|
bool or |
Apply pseudo-state visual styling. |
|
|
|
bool |
Compact states with no visible action text. |
|
|
|
bool or |
Master switch for enter, during, exit, aspect, abstract, and concrete action visibility. |
|
|
|
bool or |
Show only enter actions when overriding the lifecycle parent switch. |
|
|
|
bool or |
Show during actions when visible lifecycle details are needed. |
|
|
|
bool or |
Show exit actions. |
|
|
|
bool or |
Show |
|
|
|
bool or |
Show abstract lifecycle actions, often useful for integration surfaces. |
|
|
|
bool or |
Show concrete operation bodies, often useful for implementation review. |
|
|
|
|
Render abstract actions as text, a guillemet marker, or without an abstract marker. |
|
|
|
integer or |
Limit visible lines per action. Use this when full diagrams become too tall. |
|
|
|
bool or |
Show or hide transition guard conditions. |
|
|
|
bool or |
Show or hide transition effect blocks. |
|
|
|
|
Choose note-on-link effects, compact inline effects, or hidden effects. |
|
|
|
bool or |
Show or hide event names on transitions. |
|
|
|
tuple of |
Components for event labels. |
|
|
|
|
Add event colors, an event legend, both, or no special event visualization. |
|
|
|
same position labels as |
Position for the event legend when event legend output is enabled. |
|
|
|
integer or |
Limit expanded hierarchy depth and insert a collapsed-state marker below the limit. |
|
|
|
string |
Text shown for collapsed descendants when |
|
|
|
bool |
Include or omit the pyfcstm PlantUML style block. |
|
|
|
bool |
Include or omit PlantUML stereotypes such as |
|
Python API only |
|
mapping or |
Custom event color mapping for |
Field and renderer example cards
The table above gives the closed field list. The cards below show how groups of fields interact in real commands. They are intentionally repetitive: each row gives a concrete command, the expected source or rendering signal, and the reason to choose or avoid it.
Preset resolution examples
Use case |
Command |
Expected effect |
Selection rule |
|---|---|---|---|
Minimal structure review |
|
Shows hierarchy, variables, transition guards/effects, and events; hides lifecycle action text and pseudo-state styling. |
Use for architecture discussion where implementation bodies would distract. |
Normal documentation view |
|
Adds pseudo-state styling while keeping lifecycle actions hidden. |
Use for most documentation and review snippets. |
Full semantic review |
|
Shows lifecycle action families and concrete/abstract action visibility controlled by the detail preset. |
Use for semantic review, generated-runtime alignment, or debugging. |
Override after preset |
|
Explicit value wins over preset defaults. |
Use sparingly when a mostly minimal diagram needs one semantic dimension. |
- Review note:
If the command changes source visibility, verify the generated
.puml. If it changes rendering behavior, verifyvisualize --checkor the rendered artifact path.
Variable and state label examples
Use case |
Command |
Expected effect |
Selection rule |
|---|---|---|---|
Legend variables |
|
Variable definitions render in a PlantUML legend. |
Good when variables are global context for the whole diagram. |
Hide variables |
|
Variable inventory is removed from the source. |
Good for structure-only diagrams. |
Dual state labels |
|
State labels include both readable extra name and raw model name. |
Good when generated identifiers and DSL names both matter. |
Collapsed depth |
|
Descendants beyond depth are replaced by the marker. |
Good for large hierarchical models. |
- Review note:
If the command changes source visibility, verify the generated
.puml. If it changes rendering behavior, verifyvisualize --checkor the rendered artifact path.
Lifecycle visibility examples
Use case |
Command |
Expected effect |
Selection rule |
|---|---|---|---|
Master lifecycle switch |
|
Enter, during, exit, aspect, abstract, and concrete action families inherit visible defaults. |
Use when lifecycle ordering is part of review. |
Only abstract hooks |
|
Abstract extension points remain visible while concrete bodies stay hidden. |
Use for integration-surface reviews. |
Limit action text |
|
Long action bodies are clipped after the configured line count. |
Use when full diagrams become too tall. |
Aspect-only review |
|
Descendant-cycle before/after aspects are visible without other lifecycle bodies. |
Use when reviewing cross-cutting behavior. |
- Review note:
If the command changes source visibility, verify the generated
.puml. If it changes rendering behavior, verifyvisualize --checkor the rendered artifact path.
Transition and event examples
Use case |
Command |
Expected effect |
Selection rule |
|---|---|---|---|
Hide guards |
|
Transition labels omit guard conditions. |
Use only when guards are not relevant to the audience. |
Inline effects |
|
Transition effects appear compactly on the transition instead of note blocks. |
Use for small effect bodies. |
Event legend |
|
Events get a legend without coloring transitions. |
Use when event names repeat often. |
Event colors and legend |
|
Events are colored and listed in the legend. |
Use for event-flow diagrams. |
- Review note:
If the command changes source visibility, verify the generated
.puml. If it changes rendering behavior, verifyvisualize --checkor the rendered artifact path.
Renderer and environment examples
Use case |
Command |
Expected effect |
Selection rule |
|---|---|---|---|
Source-only export |
|
No renderer is checked or used. |
Safe even when Java or network rendering is unavailable. |
Backend check |
|
Reports local and remote availability and exits without parsing DSL. |
Use before CI rendering jobs. |
Cache output |
|
Writes to the pyfcstm visualize cache when -o is omitted. |
Use only for local preview, not reproducible build outputs. |
Strict open |
|
Viewer launch failure becomes command failure. |
Use only for desktop workflows that require opening the image. |
- Review note:
If the command changes source visibility, verify the generated
.puml. If it changes rendering behavior, verifyvisualize --checkor the rendered artifact path.
Invalid value examples
Use case |
Command |
Expected effect |
Selection rule |
|---|---|---|---|
Unknown field |
|
Fails because the key is not a PlantUMLOptions field. |
Check the complete field table. |
Wrong integer |
|
Fails because max_depth expects an integer or None. |
Use a number such as 2. |
Wrong render type suffix |
|
Fails before rendering because suffix and type disagree. |
Use -o machine.png or -t svg. |
Private source over remote |
|
This may succeed but sends PlantUML source to a service. |
Use local rendering for private diagrams. |
- Review note:
If the command changes source visibility, verify the generated
.puml. If it changes rendering behavior, verifyvisualize --checkor the rendered artifact path.
Resolution trace: lifecycle actions
Lifecycle visibility is the most common place where users misread the option model. The resolved value is not simply the dataclass default:
An explicit child switch such as
show_enter_actions=falsewins first.If the child switch is
None, it inherits fromshow_lifecycle_actionswhen that parent switch is explicit.If the parent switch is also
None, the selected detail preset supplies the default.Final fallback values are applied only after those steps.
Input |
Resolved meaning |
Reader-visible result |
|---|---|---|
|
lifecycle parent and child switches resolve false. |
lifecycle text is hidden. |
|
lifecycle parent and child switches resolve true. |
enter/during/exit/aspect/abstract/concrete actions are visible unless another option hides them. |
|
concrete body visibility is explicitly false; other full preset action groups remain visible. |
abstract hooks can remain visible while implementation bodies are hidden. |
|
explicit child switch overrides explicit parent switch for enter actions. |
enter actions are visible even though other lifecycle groups remain hidden. |
Per-field scenario matrix
The complete field map above is intentionally closed-list. The matrix below is more practical: every public field gets two normal examples and one boundary example. Use it when a review needs to prove that a diagram choice is deliberate rather than accidental.
Field |
Example A |
Example B |
Boundary or counterexample |
|---|---|---|---|
|
|
|
Do not pass |
|
|
|
|
|
|
|
|
|
|
|
Quote values containing spaces in shells. |
|
|
|
|
|
|
|
It affects styling only, not whether pseudo states exist in the model. |
|
|
|
If lifecycle details are hidden, a state may become visually empty even though it has hidden actions. |
|
|
|
It hides diagram detail only; it does not delete model states. |
|
|
|
The marker appears only when |
Field |
Example A |
Example B |
Boundary or counterexample |
|---|---|---|---|
|
|
|
Child switches override it only when they are explicitly set. |
|
|
|
|
|
|
|
Aspect |
|
|
|
Hiding exit actions does not hide transition effects. |
|
|
|
It is about aspect hooks, not ordinary transition guards. |
|
|
|
It filters action visibility after lifecycle visibility has allowed the action group. |
|
|
|
It does not change generated runtime behavior. |
|
|
|
|
|
|
|
|
Field |
Example A |
Example B |
Boundary or counterexample |
|---|---|---|---|
|
|
|
Hiding guards can make mutually exclusive paths look ambiguous. |
|
|
|
Effects may still exist in the model even if hidden from the diagram. |
|
|
|
|
|
|
|
Event colors and legends are not useful if events are hidden. |
|
|
|
|
|
|
|
|
|
|
|
It matters only when event legend output is enabled. |
|
|
|
Turning it off can make pseudo/composite distinctions less visible. |
|
|
|
Some style rules depend on stereotypes, so disabling them can change visual meaning. |
|
Python API code can map event groups to stable colors. |
Use it for a publication diagram that must match a legend palette. |
The CLI cannot parse dictionary values for this field. |
Decision |
Example A |
Example B |
Boundary or counterexample |
|---|---|---|---|
Render type |
|
|
The output suffix must match the type when a suffix is provided. |
Renderer mode |
|
|
|
Local backend paths |
|
|
These options do not affect remote rendering. |
Remote backend host |
|
|
Remote rendering sends source text to that host. |
Viewer behavior |
|
|
CI, |
Typed -c value syntax
The CLI accepts repeated -c key=value arguments and parses values with the
same helper used by other pyfcstm configuration paths.
Form |
Examples |
Result |
Notes |
|---|---|---|---|
bool |
|
Python |
For bool-typed fields, only these forms are accepted. |
int |
|
Python |
Used by |
float |
|
Python |
Auto parser supports floats, though current PlantUML CLI fields do not require float-specific options. |
quoted string |
|
Python |
Quote the entire shell argument when spaces are part of the value. |
none/null |
|
Python |
Most CLI fields use explicit concrete types, so |
tuple |
|
tuple of strings |
Used by |
optional value |
omitted option, or explicit |
inherited/resolved value |
Optional booleans resolve through parent switches and presets. |
invalid key |
|
command failure |
Unknown keys reach |
invalid value |
|
command failure |
Type-specific parsing reports the offending key. |
CLI examples:
pyfcstm plantuml -i machine.fcstm -c show_events=true -c max_depth=2
pyfcstm plantuml -i machine.fcstm -c state_name_format=extra_name,name
pyfcstm plantuml -i machine.fcstm -c 'variable_legend_position=bottom right'
Python API examples:
from pyfcstm.model.plantuml import PlantUMLOptions
api_surface = PlantUMLOptions(
detail_level='full',
show_concrete_actions=False,
show_abstract_actions=True,
abstract_action_marker='symbol',
)
event_view = PlantUMLOptions(
event_visualization_mode='both',
custom_colors={'System.Start': '#00AA00'},
)
Renderer and file options
These options belong to visualize only. They do not affect PlantUML source
content.
Fact |
Values |
Meaning |
|---|---|---|
Renderer mode |
|
|
Render type |
|
Output file type. The output suffix must match the selected type when a suffix is provided. |
Cache path |
platform-specific |
Used when |
Check mode |
|
Checks renderer availability and exits without parsing a DSL file. |
Open mode |
|
Controls viewer launch after rendering. Headless environments skip viewer launch unless strict mode is requested. |
Environment variables
Variable |
Used by |
Meaning |
|---|---|---|
|
|
Default PlantUML jar path when |
|
|
Default remote PlantUML server when |
|
|
Truthy value disables automatic viewer launch. |
|
|
Truthy value marks the environment as headless. |
|
Linux viewer detection |
At least one normally indicates a graphical session on Linux. |
|
Linux cache output |
Base directory for omitted |
|
Windows cache output |
Base directory for omitted |
Behavior boundaries
Boundary |
Exact behavior |
|---|---|
|
|
|
|
|
|
|
In headless environments, normal |
|
|
|
Remote rendering sends the generated PlantUML source to the configured service. Use local rendering for private diagrams. |
|
Omitted |
|
Local failures name the local renderer and include the underlying |
|
Remote failures name the remote renderer and include the underlying network/request error when available. |
|
If |
|
|
|
|