Skip to content

Commit

Permalink
Add diverging norm example in plots
Browse files Browse the repository at this point in the history
  • Loading branch information
stella-bourdin committed Jan 28, 2021
1 parent 1b8711c commit 430049f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dynamicopy/cartoplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def lon_lat_plot_map(lon, lat, var, lon_axis=-1, lat_axis=-2, fig_ax=None, title
colorbar_label : str, optional
label to be shown beside the colorbar, by default ''
norm : matplotlib.colors.<any>Norm, optional
normalization of the colormap, by default TwoSlopeNorm(vcenter=0)
normalization for the colormap, by default None
Example : with `import matplotlib.colors as c` in header of your script
* For centering diverging colormap : c.DivergingNorm(vcenter = 0.0)
smooth : bool, optional
if True, contourf is used instead of pcolormesh, by default False
projection : cartopy.crs projection, optional
Expand Down
4 changes: 4 additions & 0 deletions dynamicopy/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def lon_lat_plot(lon, lat, var, lon_axis=-1, lat_axis=-2, fig_ax=None, title='',
label of the colorbar, by default ''
norm : matplotlib.colors.<any>Norm, optional
normalization for the colormap, by default None
Example : with `import matplotlib.colors as c` in header of your script
* For centering diverging colormap : c.DivergingNorm(vcenter = 0.0)
smooth : bool, optional
if True, contourf is used instead of pcolormesh, by default False
savefig : bool, optional
Expand Down Expand Up @@ -123,6 +125,8 @@ def zonal_plot(lat, lev, var, lat_axis = -1, lev_axis = -2, fig_ax=None, title='
label of the colorbar, by default ''
norm : matplotlib.colors.<any>Norm, optional
normalization for the colormap, by default None
Example : with `import matplotlib.colors as c` in header of your script
* For centering diverging colormap : c.DivergingNorm(vcenter = 0.0)
smooth : bool, optional
if True, contourf is used instead of pcolormesh, by default False
savefig : bool, optional
Expand Down

0 comments on commit 430049f

Please sign in to comment.