Skip to content

Commit

Permalink
[swanson] formatting edits
Browse files Browse the repository at this point in the history
  • Loading branch information
berberto committed Sep 4, 2024
1 parent efb3a83 commit a906aa7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iblatlas/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,16 +907,16 @@ def plot_swanson_vector(acronyms=None, values=None, ax=None, hemisphere=None, br
elif isinstance(cmap, str):
colormap = matplotlib.colormaps.get_cmap(cmap)
else:
raise ValueError(f"Invalid option for `cmap`")
raise ValueError("`cmap` option must be of type `str` or `matplotlib.colors.Colormap`")

vmin = vmin if vmin is not None else np.nanmin(vals)
vmax = vmax if vmax is not None else np.nanmax(vals)
norm = colors.Normalize(vmin=vmin, vmax=vmax)
rgba_color = colormap(norm(vals), bytes=True)
if show_cbar:
_cbar = fig.colorbar(cm.ScalarMappable(norm=norm, cmap=cmap),
ax=ax, orientation='vertical', extend=extend,
)
ax=ax, orientation='vertical', extend=extend,
)

if mask is not None:
imr, _ = br.propagate_down(mask, np.ones_like(mask))
Expand Down

0 comments on commit a906aa7

Please sign in to comment.