Skip to content

Commit 325f4d3

Browse files
author
Gorshanov Vadim
committed
Parse ", s" in the legend as a second
1 parent a781c3e commit 325f4d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tikzplotlib/_line2d.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ def draw_line2d(data, obj):
103103
if legend_text is not None:
104104
legend_text_escaped = re.sub(r"(\d+(\.\d+)?)%",
105105
r"\\SI{\1}{\\percent}",
106-
legend_text).replace("+-\\SI{", "\\SI{+-")
106+
legend_text).replace("+-\\SI{",
107+
"\\SI{+-").replace(", s",
108+
", \\SI{\s}")
107109
content.append(f"\\addlegendentry{{{legend_text_escaped}}}\n")
108110

109111
return data, content

0 commit comments

Comments
 (0)