Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
raise ValueError("Incompatible color_bar=%s and "
"share=%s" % (color_bar, share))
if share == 'r' and color_bar in {'top', 'bottom'}:
raise ValueError("Incompatible color_bar=%s and "
"share=%s" % (color_bar, share))
layout = np.atleast_2d(layout)
nrow, ncol = shape = layout.shape
view = _broadcast(view, 'view', shape)
zoom = _broadcast(zoom, 'zoom', shape)
array_name = _expand_arg(array_name, 'array_name', shape)
cmap = _expand_arg(cmap, 'cmap', shape, ref=array_name)
color_range = _expand_arg(color_range, 'cbar_range', shape, ref=array_name)
ren_kwds = _grep_args('renderer', shape, kwargs)
actor_kwds = _grep_args('actor', shape, kwargs, ref=array_name)
mapper_kwds = _grep_args('mapper', shape, kwargs, ref=array_name)
# Label text
if label_text is None:
label_text = {}
elif isinstance(label_text, (list, np.ndarray)):
label_text = {'left': label_text}
# Array ranges
specs = _get_ranges(layout, surfs, array_name, share, color_range)
# Grid
grid_row, grid_col, ridx, cidx, entries = \
if share == 'c' and color_bar in {'left', 'right'}:
raise ValueError("Incompatible color_bar=%s and "
"share=%s" % (color_bar, share))
if share == 'r' and color_bar in {'top', 'bottom'}:
raise ValueError("Incompatible color_bar=%s and "
"share=%s" % (color_bar, share))
layout = np.atleast_2d(layout)
nrow, ncol = shape = layout.shape
view = _broadcast(view, 'view', shape)
zoom = _broadcast(zoom, 'zoom', shape)
array_name = _expand_arg(array_name, 'array_name', shape)
cmap = _expand_arg(cmap, 'cmap', shape, ref=array_name)
color_range = _expand_arg(color_range, 'cbar_range', shape, ref=array_name)
ren_kwds = _grep_args('renderer', shape, kwargs)
actor_kwds = _grep_args('actor', shape, kwargs, ref=array_name)
mapper_kwds = _grep_args('mapper', shape, kwargs, ref=array_name)
# Label text
if label_text is None:
label_text = {}
elif isinstance(label_text, (list, np.ndarray)):
label_text = {'left': label_text}
# Array ranges
specs = _get_ranges(layout, surfs, array_name, share, color_range)
# Grid
if share == 'c' and color_bar in {'left', 'right'}:
raise ValueError("Incompatible color_bar=%s and "
"share=%s" % (color_bar, share))
if share == 'r' and color_bar in {'top', 'bottom'}:
raise ValueError("Incompatible color_bar=%s and "
"share=%s" % (color_bar, share))
layout = np.atleast_2d(layout)
nrow, ncol = shape = layout.shape
view = _broadcast(view, 'view', shape)
zoom = _broadcast(zoom, 'zoom', shape)
array_name = _expand_arg(array_name, 'array_name', shape)
cmap = _expand_arg(cmap, 'cmap', shape, ref=array_name)
color_range = _expand_arg(color_range, 'cbar_range', shape, ref=array_name)
ren_kwds = _grep_args('renderer', shape, kwargs)
actor_kwds = _grep_args('actor', shape, kwargs, ref=array_name)
mapper_kwds = _grep_args('mapper', shape, kwargs, ref=array_name)
# Label text
if label_text is None:
label_text = {}
elif isinstance(label_text, (list, np.ndarray)):
label_text = {'left': label_text}
# Array ranges
specs = _get_ranges(layout, surfs, array_name, share, color_range)