We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ba5374 commit 0debea7Copy full SHA for 0debea7
src/tikzplotlib/_text.py
@@ -59,7 +59,8 @@ def draw_text(data, obj):
59
60
if obj.axes:
61
# If the coordinates are relative to an axis, use `axis cs`.
62
- tikz_pos = f"(axis cs:{pos[0]:{ff}},{pos[1]:{ff}})"
+ rel = "rel " if abs(pos[0]) < 1 and abs(pos[1]) < 1 else ""
63
+ tikz_pos = f"({rel}axis cs:{pos[0]:{ff}},{pos[1]:{ff}})"
64
else:
65
# relative to the entire figure, it's a getting a littler harder. See
66
# <http://tex.stackexchange.com/a/274902/13262> for a solution to the
0 commit comments