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

Commit14b34fd

Browse files
authored
Merge pull request#20632 from timhoffm/ticklabels-empty-str
Use ticklabels([]) instead of ticklabels('')
2 parents30cbdf7 +e0ddd9b commit14b34fd

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

‎examples/subplots_axes_and_figures/zoom_inset_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def get_demo_image():
3333
x1,x2,y1,y2=-1.5,-0.9,-2.5,-1.9
3434
axins.set_xlim(x1,x2)
3535
axins.set_ylim(y1,y2)
36-
axins.set_xticklabels('')
37-
axins.set_yticklabels('')
36+
axins.set_xticklabels([])
37+
axins.set_yticklabels([])
3838

3939
ax.indicate_inset_zoom(axins,edgecolor="black")
4040

‎examples/text_labels_and_annotations/mathtext_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def doall():
6868
plt.gca().set_ylim(0.,1.)
6969
plt.gca().set_title("Matplotlib's math rendering engine",
7070
color=mpl_grey_rvb,fontsize=14,weight='bold')
71-
plt.gca().set_xticklabels("",visible=False)
72-
plt.gca().set_yticklabels("",visible=False)
71+
plt.gca().set_xticklabels([])
72+
plt.gca().set_yticklabels([])
7373

7474
# Gap between lines in axes coords
7575
line_axesfrac=1/n_lines

‎lib/matplotlib/projections/geo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ def set_yscale(self, *args, **kwargs):
147147
set_xscale=set_yscale
148148

149149
defset_xlim(self,*args,**kwargs):
150+
"""Not supported. Please consider using Cartopy."""
150151
raiseTypeError("Changing axes limits of a geographic projection is "
151152
"not supported. Please consider using Cartopy.")
152153

‎lib/matplotlib/tests/test_constrainedlayout.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def example_plot(ax, fontsize=12, nodec=False):
1616
ax.set_ylabel('y-label',fontsize=fontsize)
1717
ax.set_title('Title',fontsize=fontsize)
1818
else:
19-
ax.set_xticklabels('')
20-
ax.set_yticklabels('')
19+
ax.set_xticklabels([])
20+
ax.set_yticklabels([])
2121

2222

2323
defexample_pcolor(ax,fontsize=12):
@@ -428,8 +428,8 @@ def test_colorbar_align():
428428
ifnn!=1:
429429
cb.ax.xaxis.set_ticks([])
430430
cb.ax.yaxis.set_ticks([])
431-
ax.set_xticklabels('')
432-
ax.set_yticklabels('')
431+
ax.set_xticklabels([])
432+
ax.set_yticklabels([])
433433
fig.set_constrained_layout_pads(w_pad=4/72,h_pad=4/72,hspace=0.1,
434434
wspace=0.1)
435435

‎lib/matplotlib/tests/test_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,12 +636,12 @@ def test_large_subscript_title():
636636
ax=axs[0]
637637
ax.set_title(r'$\sum_{i} x_i$')
638638
ax.set_title('New way',loc='left')
639-
ax.set_xticklabels('')
639+
ax.set_xticklabels([])
640640

641641
ax=axs[1]
642642
ax.set_title(r'$\sum_{i} x_i$',y=1.01)
643643
ax.set_title('Old Way',loc='left')
644-
ax.set_xticklabels('')
644+
ax.set_xticklabels([])
645645

646646

647647
deftest_wrap():

‎tutorials/intermediate/constrainedlayout_guide.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ def example_plot(ax, fontsize=12, hide_labels=False):
296296
forpad,axinzip(pads,axs.flat):
297297
pc=ax.pcolormesh(arr,**pc_kwargs)
298298
fig.colorbar(pc,ax=ax,shrink=0.6,pad=pad)
299-
ax.set_xticklabels('')
300-
ax.set_yticklabels('')
299+
ax.set_xticklabels([])
300+
ax.set_yticklabels([])
301301
ax.set_title(f'pad:{pad}')
302302
fig.set_constrained_layout_pads(w_pad=2/72,h_pad=2/72,hspace=0.2,
303303
wspace=0.2)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp