Skip to content

Commit c195412

Browse files
authored
Merge pull request matplotlib#11119 from pwuertz/fix_11116
PGF: Get unitless positions from Text elements (fix matplotlib#11116)
2 parents 77ca117 + 1359636 commit c195412

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)