Skip to content

Commit 0ba5374

Browse files
author
Gorshanov Vadim
committed
Escape annotations in plots
1 parent d0e91fc commit 0ba5374

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tikzplotlib/_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def draw_text(data, obj):
151151
text = text.replace("\n ", "\\\\")
152152

153153
props = ",\n ".join(properties)
154-
text = " ".join(style + [text])
154+
text = escape_text(" ".join(style + [text])).replace("\n", "\\\\")
155155
content.append(f"\\draw {tikz_pos} node[\n {props}\n]{{{text}}};\n")
156156
return data, content
157157

0 commit comments

Comments
 (0)