kkpy.cm¶
Colormaps for my research
wind
|
KNU reflectivity colors. |
|
KNU Doppler velocity colors. |
|
KNU differential reflectivity colors. |
|
KNU specific differential phase colors. |
|
KNU cross correlation coefficient colors. |
|
KNU Precipitation colors. |
|
KMA Radar Precipitation colors. |
|
KMA AWS Precipitation colors. |
|
Wind direction colors (cyclic). |
-
kkpy.cm.
refl
(levels=None, snow=False)[source]¶ KNU reflectivity colors.
Examples
>>> cmap = kkpy.cm.refl() >>> pm = ax.pcolormesh(lon2d, lat2d, ref2d.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> plt.colorbar(pm, ticks=cmap['ticks'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
snow (boolean, optional) – Return broader tick levels suitable for snow. Default is False.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary
-
kkpy.cm.
doppler
(levels=None)[source]¶ KNU Doppler velocity colors.
Examples
>>> cmap = kkpy.cm.doppler() >>> pm = ax.pcolormesh(lon2d, lat2d, VD2d.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> plt.colorbar(pm, ticks=cmap['ticks'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary
-
kkpy.cm.
zdr
(levels=None)[source]¶ KNU differential reflectivity colors.
Examples
>>> cmap = kkpy.cm.zdr() >>> pm = ax.pcolormesh(lon2d, lat2d, zdr2d.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> plt.colorbar(pm, ticks=cmap['ticks'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary
-
kkpy.cm.
kdp
(levels=None)[source]¶ KNU specific differential phase colors.
Examples
>>> cmap = kkpy.cm.kdp() >>> pm = ax.pcolormesh(lon2d, lat2d, kdp2d.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> plt.colorbar(pm, ticks=cmap['ticks'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary
-
kkpy.cm.
rhohv
(levels=None)[source]¶ KNU cross correlation coefficient colors.
Examples
>>> cmap = kkpy.cm.rhohv() >>> pm = ax.pcolormesh(lon2d, lat2d, rhohv2d.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> plt.colorbar(pm, ticks=cmap['ticks'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary
-
kkpy.cm.
precip
(levels=None, coarse_ticks=False)[source]¶ KNU Precipitation colors.
Examples
>>> cmap = kkpy.cm.precip() >>> pm = ax.pcolormesh(lon2d, lat2d, prec2d.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> plt.colorbar(pm, ticks=cmap['ticks'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
coarse_ticks (boolean, optional) – True if colorbar levels are too dense.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary
-
kkpy.cm.
precip_kma
(levels=None, coarse_ticks=False)[source]¶ KMA Radar Precipitation colors.
Examples
>>> cmap = kkpy.cm.precip_kma() >>> pm = ax.pcolormesh(lon2d, lat2d, prec2d.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> plt.colorbar(pm, ticks=cmap['ticks'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
coarse_ticks (boolean, optional) – True if colorbar levels are too dense.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary
-
kkpy.cm.
precip_kma_aws
(levels=None, coarse_ticks=False)[source]¶ KMA AWS Precipitation colors.
Examples
>>> cmap = kkpy.cm.precip_kma_aws() >>> pm = ax.pcolormesh(lon2d, lat2d, prec2d.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> plt.colorbar(pm, ticks=cmap['ticks'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
coarse_ticks (boolean, optional) – True if colorbar levels are too dense.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary
-
kkpy.cm.
wind
(levels=None)[source]¶ Wind direction colors (cyclic).
Examples
>>> cmap = kkpy.cm.wind() >>> pm = ax.pcolormesh(lon2d, lat2d, winddir.T, cmap=cmap['cmap'], norm=cmap['norm']) >>> cb = plt.colorbar(pm, ticks=cmap['ticks']) >>> cb.set_ticklabels(['N', 'E', 'S', 'W', 'N'])
- Parameters
levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.
- Returns
dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar
- Return type
dictionary