Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 038b3ff

Browse files
committed
fix position of rotated mathtext in agg backend
1 parent 42055bd commit 038b3ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def draw_mathtext(self, gc, x, y, s, prop, angle):
155155

156156
xd = descent * np.sin(np.deg2rad(angle))
157157
yd = descent * np.cos(np.deg2rad(angle))
158-
x = np.round(x + ox - xd)
158+
x = np.round(x + ox + xd)
159159
y = np.round(y - oy + yd)
160160
self._renderer.draw_text_image(font_image, x, y + 1, angle, gc)
161161

0 commit comments

Comments
 (0)