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

Commitcb6fc74

Browse files
committed
Add test for tight AxisArtist
1 parent133f797 commitcb6fc74

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

‎lib/mpl_toolkits/tests/test_axisartist_axis_artist.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
importmath
2+
13
importmatplotlib.pyplotasplt
24
frommatplotlib.testing.decoratorsimportimage_comparison
35

@@ -97,3 +99,21 @@ def test_axis_artist():
9799
axisline.label.set_pad(5)
98100

99101
ax.set_ylabel("Test")
102+
103+
104+
@image_comparison(['axis_artist_tight.png'],style='mpl20',
105+
remove_text=True)
106+
deftest_axis_artist_tight():
107+
fig,ax=plt.subplots()
108+
109+
ax.xaxis.set_visible(False)
110+
ax.yaxis.set_visible(False)
111+
112+
forlocin ('left','right','bottom'):
113+
_helper=AxisArtistHelperRectlinear.Fixed(ax,loc=loc)
114+
axisline=AxisArtist(ax,_helper,offset=None,axis_direction=loc)
115+
ax.add_artist(axisline)
116+
117+
# Settings for bottom AxisArtist.
118+
axisline.major_ticks.set_tick_out(True)
119+
plt.tight_layout()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp