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 AxisArtist#23534

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 merge2 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromoscargus:getwindowextent
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.
18 changes: 18 additions & 0 deletionslib/mpl_toolkits/tests/test_axisartist_axis_artist.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,3 +97,21 @@ def test_axis_artist():
axisline.label.set_pad(5)

ax.set_ylabel("Test")


@image_comparison(['axis_artist_tight.png'], style='mpl20',
remove_text=True)
def test_axis_artist_tight():
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.major_ticks.set_tick_out(True)
plt.tight_layout()
4 changes: 2 additions & 2 deletionstutorials/intermediate/constrainedlayout_guide.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,8 +70,8 @@ def example_plot(ax, fontsize=12, hide_labels=False):
# To prevent this, the location of axes needs to be adjusted. For
# subplots, this can be done manually by adjusting the subplot parameters
# using `.Figure.subplots_adjust`. However, specifying your figure with the
##``layout="constrained"`` keyword argument will do the adjusting
##automatically.
# ``layout="constrained"`` keyword argument will do the adjusting
# automatically.

fig, ax = plt.subplots(layout="constrained")
example_plot(ax, fontsize=24)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp