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 1cf5a33

Browse filesBrowse files
committed
Use _generate_transform more.
1 parent 6b082ab commit 1cf5a33
Copy full SHA for 1cf5a33

File tree

Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed

‎lib/matplotlib/backends/backend_svg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_svg.py
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,17 +1160,15 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath, mtext=None):
11601160
attrib['x'] = short_float_fmt(ax)
11611161
attrib['y'] = short_float_fmt(ay)
11621162
attrib['style'] = _generate_css(style)
1163-
attrib['transform'] = "rotate(%s, %s, %s)" % (
1164-
short_float_fmt(-angle),
1165-
short_float_fmt(ax),
1166-
short_float_fmt(ay))
1167-
writer.element('text', s, attrib=attrib)
1163+
attrib['transform'] = _generate_transform([
1164+
("rotate", (-angle, ax, ay))])
1165+
11681166
else:
11691167
attrib['transform'] = _generate_transform([
11701168
('translate', (x, y)),
11711169
('rotate', (-angle,))])
11721170

1173-
writer.element('text', s, attrib=attrib)
1171+
writer.element('text', s, attrib=attrib)
11741172

11751173
else:
11761174
writer.comment(s)

0 commit comments

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