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

Commitee2ee26

Browse files
Fix: restore make_axes to accept a tuple of axes
Allow to pass a tuple of axes as "ax" parameter of make_axes functionSigned-off-by: Strzelczyk, Piotr <piotr.strzelczyk@intel.com>
1 parent8d8ae7f commitee2ee26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎lib/matplotlib/colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ def make_axes(parents, location=None, orientation=None, fraction=0.15,
14031403
14041404
Parameters
14051405
----------
1406-
parents : `~.axes.Axes` or list or `numpy.ndarray` of `~.axes.Axes`
1406+
parents : `~.axes.Axes` or list ortuple or`numpy.ndarray` of `~.axes.Axes`
14071407
The Axes to use as parents for placing the colorbar.
14081408
%(_make_axes_kw_doc)s
14091409
@@ -1429,7 +1429,7 @@ def make_axes(parents, location=None, orientation=None, fraction=0.15,
14291429
# reuse them, leading to a memory leak
14301430
ifisinstance(parents,np.ndarray):
14311431
parents=list(parents.flat)
1432-
elifnotisinstance(parents,list):
1432+
elifnotisinstance(parents,(tuple,list)):
14331433
parents= [parents]
14341434
fig=parents[0].get_figure()
14351435

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp