In [1]:
import matplotlib.pyplot as plt
%matplotlib inline

import numpy as np
import cartopy
import cartopy.crs as ccrs

from_proj = ccrs.PlateCarree()
to_proj = ccrs.AlbersEqualArea(central_longitude=-95.0000, central_latitude=38.0000)

lons = np.linspace(-130, -60, 25)
lats = np.linspace(15, 55, 25)

img = np.random.randint(0, 10, (25,25))

view = plt.axes([0,0,1,1], projection=to_proj)
view.set_extent([-120, -70, 20, 52])
view.add_feature(cartopy.feature.NaturalEarthFeature(
                                category='cultural',
                                name='admin_1_states_provinces_lakes',
                                scale='50m',
                                facecolor='none', edgecolor='k'))

view.add_feature(cartopy.feature.OCEAN)
view.add_feature(cartopy.feature.LAKES)
view.add_feature(cartopy.feature.BORDERS)
view.add_feature(cartopy.feature.COASTLINE)


view.pcolormesh(lons, lats, img, cmap='Greens', transform=from_proj)
Out[1]:
<matplotlib.collections.QuadMesh at 0x9481198>
In [3]:
import matplotlib.pyplot as plt
%matplotlib inline

import numpy as np
import cartopy
import cartopy.crs as ccrs

from_proj = ccrs.PlateCarree()
to_proj = ccrs.LambertConformal(central_longitude=-95.0000, central_latitude=38.0000)

lons = np.linspace(-130, -60, 25)
lats = np.linspace(15, 55, 25)

img = np.random.randint(0, 10, (25,25))

view = plt.axes([0,0,1,1], projection=to_proj)
view.set_extent([-120, -70, 20, 52])
view.add_feature(cartopy.feature.NaturalEarthFeature(
                                category='cultural',
                                name='admin_1_states_provinces_lakes',
                                scale='50m',
                                facecolor='none', edgecolor='k'))

view.add_feature(cartopy.feature.OCEAN)
view.add_feature(cartopy.feature.LAKES)
view.add_feature(cartopy.feature.BORDERS)
view.add_feature(cartopy.feature.COASTLINE)


view.pcolormesh(lons, lats, img, cmap='Greens', transform=from_proj)
Out[3]:
<matplotlib.collections.QuadMesh at 0xa5d0828>
In [19]:
proj = cartopy.crs.LambertConformal(central_latitude=25, central_longitude=-97,
                                    standard_parallels=[25])
ax = plt.axes([0,0,1,1], projection=proj)
ax.set_extent([-140, -70, 20, 60])
ax.add_feature(cartopy.feature.OCEAN)
ax.coastlines()
plt.title("dopplershift example (standard_parallels=[25])")
Out[19]:
<matplotlib.text.Text at 0xc506ef0>
In [20]:
proj = cartopy.crs.LambertConformal(central_latitude=25, central_longitude=-97,
                                    standard_parallels=[25, 55])
ax = plt.axes([0,0,1,1], projection=proj)
ax.set_extent([-140, -70, 20, 60])
ax.add_feature(cartopy.feature.OCEAN)
ax.coastlines()
plt.title("dopplershift example (standard_parallels=[25, 55])")
Out[20]:
<matplotlib.text.Text at 0xc561a58>
In [31]:
proj = cartopy.crs.LambertConformal(central_latitude=25, central_longitude=-97,
                                    standard_parallels=[32])
ax = plt.axes([0,0,1,1], projection=proj)
ax.set_extent([-140, -70, 0, 60])
ax.add_feature(cartopy.feature.OCEAN)
ax.coastlines()
plt.title("dopplershift example (standard_parallels=[20])")
Out[31]:
<matplotlib.text.Text at 0xd8505c0>
In [22]:
proj = cartopy.crs.LambertConformal(central_latitude=25, central_longitude=-97)
ax = plt.axes([0,0,1,1], projection=proj)
ax.set_extent([-140, -70, 20, 60])
ax.add_feature(cartopy.feature.OCEAN)
ax.coastlines()
plt.title("dopplershift example (standard_parallels=default)")
Out[22]:
<matplotlib.text.Text at 0xa620b00>
In [ ]: