Skip to content

Commit 7b81c41

Browse files
authored
fix: Removing unit from fontsize when calling pydot (#470)
1 parent abf8bcb commit 7b81c41

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

statemachine/contrib/diagram.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ class DotGraphMachine:
1818
font_name = "Arial"
1919
"""Graph font face name"""
2020

21-
state_font_size = "10pt"
22-
"""State font size"""
21+
state_font_size = "10"
22+
"""State font size in points"""
2323

2424
state_active_penwidth = 2
2525
"""Active state external line width"""
2626

2727
state_active_fillcolor = "turquoise"
2828

29-
transition_font_size = "9pt"
30-
"""Transition font size"""
29+
transition_font_size = "9"
30+
"""Transition font size in points"""
3131

3232
def __init__(self, machine):
3333
self.machine = machine
@@ -48,7 +48,7 @@ def _initial_node(self):
4848
"i",
4949
shape="circle",
5050
style="filled",
51-
fontsize="1pt",
51+
fontsize="1",
5252
fixedsize="true",
5353
width=0.2,
5454
height=0.2,
@@ -167,7 +167,7 @@ def quickchart_write_svg(sm: StateMachine, path: str):
167167
>>> print(sm._graph().to_string())
168168
digraph list {
169169
fontname=Arial;
170-
fontsize="10pt";
170+
fontsize=10;
171171
label=OrderControl;
172172
rankdir=LR;
173173
...

0 commit comments

Comments
 (0)