Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit addf1ee

Browse filesBrowse files
committed
scale descent back
1 parent 92f2328 commit addf1ee
Copy full SHA for addf1ee

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎lib/matplotlib/backends/backend_macosx.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_macosx.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ def _draw_mathtext(self, gc, x, y, s, prop, angle):
130130
scale = self.gc.get_image_magnification()
131131
ox, oy, width, height, descent, image, used_characters = \
132132
self.mathtext_parser.parse(s, self.dpi*scale, prop)
133+
descent /= scale
134+
xd = descent * numpy.sin(numpy.deg2rad(angle))
135+
yd = descent * numpy.cos(numpy.deg2rad(angle))
136+
x = numpy.round(x + ox + xd)
137+
y = numpy.round(y + oy - yd)
133138
gc.draw_mathtext(x, y, angle, 255 - image.as_array())
134139

135140
def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.