Skip to content

Commit

Permalink
Adds a try except for cmcrameri lipari colormap (missing in older ver…
Browse files Browse the repository at this point in the history
…sions)
  • Loading branch information
fso42 committed Oct 16, 2024
1 parent d7adc89 commit f6df596
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion avaframe/out3Plot/plotUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,13 @@
cmapEnergy = {"cmap": cmapE, "colors": colorsE, "levels": levE}

# for zdelta
cmapZdelta = {"cmap": copy.copy(cmapCrameri.lipari), "colors": [], "levels": []}
# Remark FSO: the try except comes from cmcrameri v1.5 not having lipari, but it is still
# widely used (Okt 2024). TODO: remove in future versions
try:
cmapZdelta = {"cmap": copy.copy(cmapCrameri.lipari), "colors": [], "levels": []}
except AttributeError:
cmapZdelta = {"cmap": copy.copy(cmapCrameri.lapaz), "colors": [], "levels": []}


colorMaps = {
"ppr": cmapPres,
Expand Down

0 comments on commit f6df596

Please sign in to comment.