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 f9d695c

Browse filesBrowse files
committed
Fix vertical tick alignment
1 parent 1c27984 commit f9d695c
Copy full SHA for f9d695c

File tree

Expand file treeCollapse file tree

319 files changed

+14949
-14981
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

319 files changed

+14949
-14981
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def get_yaxis_text1_transform(self, pad_points):
773773
return (self.get_yaxis_transform(which='tick1') +
774774
mtransforms.ScaledTranslation(-1 * pad_points / 72.0, 0,
775775
self.figure.dpi_scale_trans),
776-
"center", "right")
776+
"center_baseline", "right")
777777

778778
def get_yaxis_text2_transform(self, pad_points):
779779
"""
@@ -799,7 +799,7 @@ def get_yaxis_text2_transform(self, pad_points):
799799
return (self.get_yaxis_transform(which='tick2') +
800800
mtransforms.ScaledTranslation(pad_points / 72.0, 0,
801801
self.figure.dpi_scale_trans),
802-
"center", "left")
802+
"center_baseline", "left")
803803

804804
def _update_transScale(self):
805805
self.transScale.set(

‎lib/matplotlib/backends/backend_pgf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pgf.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,10 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
653653

654654
f = 1.0 / self.figure.dpi
655655
text_args = []
656-
if mtext and (angle == 0 or mtext.get_rotation_mode() == "anchor"):
656+
if mtext and (
657+
(angle == 0 or
658+
mtext.get_rotation_mode() == "anchor") and
659+
mtext.get_va() != "center_baseline"):
657660
# if text anchoring can be supported, get the original coordinates
658661
# and add alignment information
659662
x, y = mtext.get_transform().transform_point(mtext.get_position())
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_axes/axhspan_epoch.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_axes/axhspan_epoch.svg
+106-106Lines changed: 106 additions & 106 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_axes/axvspan_epoch.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_axes/axvspan_epoch.svg
+106-106Lines changed: 106 additions & 106 deletions
Loading
Loading
Loading
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_axes/boxplot.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_axes/boxplot.svg
+65-65Lines changed: 65 additions & 65 deletions
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Binary file not shown.
Loading

0 commit comments

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