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

Backport PR #29382 on branch v3.10.x (Fix title position for polar plots)#29416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletionslib/matplotlib/axes/_base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3071,9 +3071,8 @@ def _update_title_position(self, renderer):
top = -np.inf
for ax in axs:
bb = None
xticklabel_top = any(tick.label2.get_visible() for tick in
[ax.xaxis.majorTicks[0], ax.xaxis.minorTicks[0]])
if (xticklabel_top or ax.xaxis.get_label_position() == 'top'):
if (ax.xaxis.get_ticks_position() in ['top', 'unknown'] or
ax.xaxis.get_label_position() == 'top'):
bb = ax.xaxis.get_tightbbox(renderer)
if bb is None:
# Extent of the outline for colorbars, of the axes otherwise.
Expand Down
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletionslib/matplotlib/tests/test_polar.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -220,6 +220,13 @@ def test_polar_rlabel_position():
ax.tick_params(rotation='auto')


@image_comparison(['polar_title_position.png'], style='mpl20')
def test_polar_title_position():
fig = plt.figure()
ax = fig.add_subplot(projection='polar')
ax.set_title('foo')


@image_comparison(['polar_theta_wedge'], style='default')
def test_polar_theta_limits():
r = np.arange(0, 3.0, 0.01)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp