Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit7e4d26a

Browse files
committed
Fix vertical tick alignment
1 parent1c27984 commit7e4d26a

File tree

318 files changed

+14949
-14981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+14949
-14981
lines changed

‎lib/matplotlib/axes/_base.py

Lines 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
defget_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

Lines 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-
ifmtextand (angle==0ormtext.get_rotation_mode()=="anchor"):
656+
ifmtextand (
657+
(angle==0or
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())
Binary file not shown.

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

Lines changed: 106 additions & 106 deletions
Loading
Binary file not shown.

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

Lines changed: 106 additions & 106 deletions
Loading
Binary file not shown.
Loading

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

Lines changed: 65 additions & 65 deletions
Loading
Binary file not shown.
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp