pyCMBS
latest
  • Introduction
  • General concept
  • Installation
  • Getting started
  • pyCMBS gallery
  • Model benchmarking
  • Benchmarking configuration
  • Customizing pyCMBS benchmarking environment
  • References
pyCMBS
  • Docs »
  • pyCMBS gallery
  • Edit on GitHub

pyCMBS gallery¶

In the following, examples will be given that introduce different features of pyCMBS.

Basic plotting¶

Read some sample data and just plot it:

from pycmbs.mapping import map_plot
import matplotlib.pyplot as plt
from pycmbs.examples import download
import numpy as np

# Read some sample data ...
air = download.get_sample_file(name='air')
air.label = 'air temperature'

# a quick plot as well as a projection plot
f1 = map_plot(air)  # unprojected
f2 = map_plot(air, use_basemap=True)  # projected
plt.show()
fig1
fig2

For plotting you have a rich suite of keyword parameters. Please use the python help() system to get full documentation from docstrings. Some more illustrations of options are provided:

map_plot(air,show_zonal=True, use_basemap=True,title='show_zonal=True')
fig3

And a few more details on customizing your map ...:

map_plot(air, use_basemap=True, title='vmin=-30.,vmax=30.,cmap_data=RdBu_r', vmin=-30., vmax=30., cmap_data='RdBu_r', ax=ax1)
map_plot(air, show_stat=True, use_basemap=True,title='show_stat=True',ax=ax3)
map_plot(air, show_stat=True, stat_type='median', use_basemap=True, title='show_stat=True,stat_type="median"', ax=ax4)
fig4
Next Previous

© Copyright 2012-2014, Alexander Loew. Revision 0df863e1.

Built with Sphinx using a theme provided by Read the Docs.