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

Add test for tight layout of axis artist#24665

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

Draft
oscargus wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromoscargus:tightaxisartisttest
Draft
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
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletionslib/mpl_toolkits/axisartist/tests/test_axis_artist.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,3 +97,24 @@ def test_axis_artist():
axisline.label.set_pad(5)

ax.set_ylabel("Test")


@image_comparison(['axis_artist_tight_layout.png'])
def test_axis_artist_tight_layout():
fig, ax = plt.subplots()

ax.xaxis.set_visible(False)
ax.yaxis.set_visible(False)

for loc in ('left', 'right', 'bottom'):
_helper = AxisArtistHelperRectlinear.Fixed(ax, loc=loc)
axisline = AxisArtist(ax, _helper, offset=None, axis_direction=loc)
ax.add_artist(axisline)

# Settings for bottom AxisArtist.
axisline.set_label("TTT")
axisline.major_ticks.set_tick_out(False)
axisline.label.set_pad(5)

ax.set_ylabel("Test")
fig.tight_layout()

[8]ページ先頭

©2009-2025 Movatter.jp