Loading py/cso_plot.py +19 −4 Original line number Diff line number Diff line Loading @@ -17,6 +17,9 @@ # By default plot country borders. # Made facecolor of lakes transparant. # # 2024-09, Arjo Segers # Support colormaps from `cmcrameri` module. # ######################################################################## ### Loading Loading @@ -516,6 +519,10 @@ class ColorbarFigure(Figure): * 'bwr' (blue-white-red) * 'pwb' (purple-white-brown) * colormaps from :py:mod:`cmcrameri` module:: 'cmcrameri.cm.navia_r' * predefined colormaps : 'jet', ... * ``color_under`` : color descriptions for underflow Loading Loading @@ -664,13 +671,21 @@ class ColorbarFigure(Figure): else: # get predefined colormap: if colors.startswith("cmcrameri.cm"): import cmcrameri self.cmap = getattr(cmcrameri.cm,colors.lstrip("cmcrameri.cm.")) else : self.cmap = matplotlib.pyplot.get_cmap(colors) # endif # endif # boundaries: if color_under is not None : self.cmap.set_under(color_under) if color_over is not None : self.cmap.set_over(color_over) if color_bad is not None : self.cmap.set_bad(color_bad) # enddef # Set_ColorMap Loading Loading
py/cso_plot.py +19 −4 Original line number Diff line number Diff line Loading @@ -17,6 +17,9 @@ # By default plot country borders. # Made facecolor of lakes transparant. # # 2024-09, Arjo Segers # Support colormaps from `cmcrameri` module. # ######################################################################## ### Loading Loading @@ -516,6 +519,10 @@ class ColorbarFigure(Figure): * 'bwr' (blue-white-red) * 'pwb' (purple-white-brown) * colormaps from :py:mod:`cmcrameri` module:: 'cmcrameri.cm.navia_r' * predefined colormaps : 'jet', ... * ``color_under`` : color descriptions for underflow Loading Loading @@ -664,13 +671,21 @@ class ColorbarFigure(Figure): else: # get predefined colormap: if colors.startswith("cmcrameri.cm"): import cmcrameri self.cmap = getattr(cmcrameri.cm,colors.lstrip("cmcrameri.cm.")) else : self.cmap = matplotlib.pyplot.get_cmap(colors) # endif # endif # boundaries: if color_under is not None : self.cmap.set_under(color_under) if color_over is not None : self.cmap.set_over(color_over) if color_bad is not None : self.cmap.set_bad(color_bad) # enddef # Set_ColorMap Loading