Skip to content

Commit 7d18dbc

Browse files
committed
fix identifying colorbar position from another colorbar instance
1 parent da22b42 commit 7d18dbc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eomaps/colorbar.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@ def __init__(
272272

273273
self._inherit_position = inherit_position
274274

275-
self._parent_cb = self._identify_parent_cb()
275+
if isinstance(self._inherit_position, ColorBar):
276+
self._parent_cb = self._inherit_position
277+
else:
278+
self._parent_cb = self._identify_parent_cb()
276279

277280
if hist_size is None:
278281
self._hist_size = 0

0 commit comments

Comments
 (0)