Skip to content

Commit

Permalink
make sure that there's only one colorbar per Maps object
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelquast committed Apr 5, 2022
1 parent 9bdd94e commit 3b3fdaa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions eomaps/eomaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2882,6 +2882,13 @@ def add_colorbar(
"""

if hasattr(self, "_colorbar"):
print(
"EOmaps: A colorbar already exists for this Maps-object!\n"
+ "...use a new layer if you want multiple colorbars!"
)
return

if layer is None:
layer = self.layer

Expand Down

0 comments on commit 3b3fdaa

Please sign in to comment.