Skip to content

Commit 1359636

Browse files
committed
PGF: Get unitless positions from Text elements (fix #11116)
1 parent 634640f commit 1359636

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,8 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
725725
mtext.get_va() != "center_baseline"):
726726
# if text anchoring can be supported, get the original coordinates
727727
# and add alignment information
728-
x, y = mtext.get_transform().transform_point(mtext.get_position())
728+
pos = mtext.get_unitless_position()
729+
x, y = mtext.get_transform().transform_point(pos)
729730
text_args.append("x=%fin" % (x * f))
730731
text_args.append("y=%fin" % (y * f))
731732

0 commit comments

Comments
 (0)