Loading py/cso_plot.py +32 −4 Original line number Diff line number Diff line # # Changes # # 2022-09, Arjo Segers, Met-Norway # Updated documentation. # # 2022-02, Arjo Segers, Met-Norway # Updated arguments for plotting hist2d to avoid deprication warnings. # ######################################################################## ### ### help ### ######################################################################## """ .. _cso-plot: Loading Loading @@ -365,12 +379,26 @@ def Setup_BaseMap( ax, title=None, domain=None, raster=None, # add title: if title is not None : ax.set_title( title ) # add coast lines: if coastlines : m.drawcoastlines() # add coast lines, might fail .. if coastlines : try : m.drawcoastlines() except : #print( 'WARNING - could not draw coast lines, skip ...' ) pass #endtry #endif # coastlines # add rivers ? if rivers : m.drawrivers() # add country borders ? if countries : m.drawcountries() if type(countries) == bool : with_countries = countries country_kwargs = {} else : with_countries = True country_kwargs = countries #endif if with_countries : m.drawcountries( **country_kwargs ) # add raster ? if raster is not None : Loading Loading @@ -1208,7 +1236,7 @@ class ColorbarFigure( Figure ) : hist2d_kwargs = {} hist2d_kwargs.update( { 'bins' : bins } ) hist2d_kwargs.update( { 'cmap' : self.cmap } ) hist2d_kwargs.update( { 'normed' : normed } ) hist2d_kwargs.update( { 'density' : normed } ) hist2d_kwargs.update( kwargs ) # add to map: Loading Loading
py/cso_plot.py +32 −4 Original line number Diff line number Diff line # # Changes # # 2022-09, Arjo Segers, Met-Norway # Updated documentation. # # 2022-02, Arjo Segers, Met-Norway # Updated arguments for plotting hist2d to avoid deprication warnings. # ######################################################################## ### ### help ### ######################################################################## """ .. _cso-plot: Loading Loading @@ -365,12 +379,26 @@ def Setup_BaseMap( ax, title=None, domain=None, raster=None, # add title: if title is not None : ax.set_title( title ) # add coast lines: if coastlines : m.drawcoastlines() # add coast lines, might fail .. if coastlines : try : m.drawcoastlines() except : #print( 'WARNING - could not draw coast lines, skip ...' ) pass #endtry #endif # coastlines # add rivers ? if rivers : m.drawrivers() # add country borders ? if countries : m.drawcountries() if type(countries) == bool : with_countries = countries country_kwargs = {} else : with_countries = True country_kwargs = countries #endif if with_countries : m.drawcountries( **country_kwargs ) # add raster ? if raster is not None : Loading Loading @@ -1208,7 +1236,7 @@ class ColorbarFigure( Figure ) : hist2d_kwargs = {} hist2d_kwargs.update( { 'bins' : bins } ) hist2d_kwargs.update( { 'cmap' : self.cmap } ) hist2d_kwargs.update( { 'normed' : normed } ) hist2d_kwargs.update( { 'density' : normed } ) hist2d_kwargs.update( kwargs ) # add to map: Loading