Skip to content

Commit ee2ee26

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 function Signed-off-by: Strzelczyk, Piotr <piotr.strzelczyk@intel.com>
1 parent 8d8ae7f commit ee2ee26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/colorbar.py

+2-2
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 or tuple 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
if isinstance(parents, np.ndarray):
14311431
parents = list(parents.flat)
1432-
elif not isinstance(parents, list):
1432+
elif not isinstance(parents, (tuple, list)):
14331433
parents = [parents]
14341434
fig = parents[0].get_figure()
14351435

0 commit comments

Comments
 (0)