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

Commita95cf32

Browse files
committed
Improve argument checking
1 parent04affd5 commita95cf32

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎lib/mpl_toolkits/axes_grid1/axes_grid.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ def set_label_mode(self, mode):
271271
- "1": Only the bottom left axes is labelled.
272272
- "all": all axes are labelled.
273273
"""
274+
_api.check_in_list(["all","L","1"],mode=mode)
274275
ifmode=="all":
275276
foraxinself.axes_all:
276277
_tick_only(ax,False,False)
@@ -291,7 +292,7 @@ def set_label_mode(self, mode):
291292
ax=col[-1]
292293
_tick_only(ax,bottom_on=False,left_on=True)
293294

294-
elifmode=="1":
295+
else:# "1"
295296
foraxinself.axes_all:
296297
_tick_only(ax,bottom_on=True,left_on=True)
297298

@@ -379,6 +380,10 @@ def __init__(self, fig,
379380
to associated *cbar_axes*.
380381
axes_class : subclass of `matplotlib.axes.Axes`, default: None
381382
"""
383+
_api.check_in_list(["each","single","edge",None],
384+
cbar_mode=cbar_mode)
385+
_api.check_in_list(["left","right","bottom","top"],
386+
cbar_location=cbar_location)
382387
self._colorbar_mode=cbar_mode
383388
self._colorbar_location=cbar_location
384389
self._colorbar_pad=cbar_pad

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp