Menu

Tree [r4677] / trunk / toolkits / basemap / examples /
 History

HTTPS access


File Date Author Commit
 200706041200-msg-ch01-SAfrica.jpg 2007-06-04 jswhit [r3355] geostationary example contributed by Scott Sinc...
 500hgtdata.gz 2006-02-28 jswhit [r2114] add data files back in
 500hgtlats.gz 2006-02-28 jswhit [r2114] add data files back in
 500hgtlons.gz 2006-02-28 jswhit [r2114] add data files back in
 README 2007-11-26 jswhit [r4453] update fcstmaps
 ccsm_popgrid.nc 2006-10-10 jswhit [r2801] new example from Ivan Lima (CCSM POP grid)
 ccsm_popgrid.py 2007-11-30 jswhit [r4520] remove numerix imports
 cities.dbf 2007-12-06 jswhit [r4659] add initial support for reading shapefiles with...
 cities.shp 2007-12-06 jswhit [r4659] add initial support for reading shapefiles with...
 cities.shx 2007-12-06 jswhit [r4659] add initial support for reading shapefiles with...
 contour_demo.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 customticks.py 2007-11-27 jswhit [r4466] use dashes kwarg
 etopo20data.gz 2006-02-28 jswhit [r2114] add data files back in
 etopo20lats.gz 2006-02-28 jswhit [r2114] add data files back in
 etopo20lons.gz 2006-02-28 jswhit [r2114] add data files back in
 fcover.dat 2005-04-16 jswhit [r1199] data file for quiver_demo.py
 fcstmaps.py 2007-12-05 jswhit [r4623] simplify time/date handling
 fillstates.py 2007-11-30 jswhit [r4520] remove numerix imports
 garp.py 2007-11-30 jswhit [r4528] color ocean areas
 geos_demo.py 2007-12-03 jswhit [r4570] add default for altitude of geostationary orbit...
 geos_demo_2.py 2007-06-05 jswhit [r3360] remove colorbar
 hires.py 2007-11-24 jswhit [r4430] use drawmapboundary to fill map projection region
 huralll020.dbf 2006-06-09 jswhit [r2461] update for hurricanes thru 2004
 huralll020.shp 2006-06-09 jswhit [r2460] update for hurricanes thru 2004
 huralll020.shx 2006-06-09 jswhit [r2460] update for hurricanes thru 2004
 hurrtracks.py 2007-11-28 jswhit [r4479] use fill_color kwarg to mapboundary to color oc...
 land_shallow_topo_2048.jpg 2006-07-26 jswhit [r2614] image for warpimage.py demo
 nws_precip_conus_20061222.nc 2007-05-25 jswhit [r3298] data file for plotprecip.py example.
 nytolondon.py 2007-03-20 jswhit [r3108] remove 'from pylab import *'
 ortho_demo.py 2007-11-24 jswhit [r4430] use drawmapboundary to fill map projection region
 panelplot.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 plot_tissot.py 2007-05-21 jswhit [r3286] use ax.add_patch instead of pylab.fill
 plotcities.py 2007-12-08 jswhit [r4671] really color by pop rank
 plotmap.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 plotmap_masked.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 plotmap_oo.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 plotprecip.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 pnganim.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 polarmaps.py 2007-03-20 jswhit [r3105] remove 'from pylab import *'
 quiver_demo.py 2007-11-22 jswhit [r4422] fix quiver_demo
 randompoints.py 2007-11-24 jswhit [r4430] use drawmapboundary to fill map projection region
 run_all.py 2007-11-17 jswhit [r4348] remove ref to pupnyere
 setwh.py 2007-11-30 jswhit [r4529] make plot smaller so it fits onscreen
 show_colormaps.py 2007-11-20 jswhit [r4385] change outerproduct to outer
 simpletest.py 2007-03-20 jswhit [r3100] remove 'from pylab import *'
 simpletest_oo.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 st99_d00.dbf 2006-06-09 jswhit [r2457] update state shape files for fillstates.py
 st99_d00.shp 2006-06-09 jswhit [r2457] update state shape files for fillstates.py
 st99_d00.shx 2006-06-09 jswhit [r2457] update state shape files for fillstates.py
 test.py 2007-12-05 jswhit [r4605] better way to handle backwards compatibility in...
 testgdal.py 2006-05-15 jswhit [r2398] updates for new colorbar
 tissot.dbf 2006-11-08 jswhit [r2862] new example - tissot's indicatrix
 tissot.shp 2006-11-08 jswhit [r2862] new example - tissot's indicatrix
 tissot.shx 2006-11-08 jswhit [r2862] new example - tissot's indicatrix
 warpimage.py 2007-11-30 jswhit [r4519] no Float32 anymore
 wiki_example.py 2007-02-14 jswhit [r3020] fixed lon/lat of California city

Read Me

Basemap example scripts

simpletest.py is the simple example given in the Basemap docstrings.

simpletest_oo.py is the same example, but using the "OO" interface (does
not import pylab).

test.py exercises all the available map projections by plotting the etopo 
20 minute bathymetry/topography data using imshow.

contour_demo.py demonstrates the use of filled contours with map projections.

customticks.py shows how to create custom tick labels for a cylindrical
projection.

plotmap.py is the example on the matplotlib 'screenshots' page (included
in test.py) which shows the ETOPO topography as an image on a Lambert
Conformal projection (using imshow).

plotmap_oo.py is a version of plotmap.py that does not import pylab - it uses
the matplotlib OO interface instead.

plotmap_masked.py is a version of plotmap.py that shows how to mask out
portions of the plot (in this case the oceans) using pcolor and imshow.

nytolondon.py shows how to draw a great circle on a map (NY to London)

hires.py illustrates the use of the high-resolution coastlines, by
drawing the coastlines, political boundaries and rivers of the British
Isles. Shows how to pickle and re-load a Basemap class instance (useful
for high-res coastlines when you are plotting the same small map region
many times in different scripts).

quiver_demo.py shows how to plot wind vectors on a map.

randompoints.py demonstrates the use of scatter to plot randomly distributed
points on the earth.

ortho_demo.py demonstrates the orthographic projection - you can interactively
enter the reference lat/lon (the viewpoint of the satellite). Also shows
how to plot the default 5 minute land-sea mask, specifying the colors
to be used for land and ocean areas.

geos_demo.py demonstrates the geostationary projection - you can interactively
enter the reference longitude and height above the equator of the
satellite.

geos_demo_2.py demonstrates how to read in a geostationary satellite image
from a jpeg file, then plot only a portion of the full earth (contributed
by Scott Sinclair, requires PIL).

fcstmaps.py is a sample multi-panel plot that accesses
data over http using the dap module. An internet connection is required.

wiki_example.py is the example from the MatplotlibCookbook scipy wiki page
(http://www.scipy.org/wikis/topical_software/MatplotlibCookbook/wikipage_view).

fillstates.py is an example that shows how to draw 
and fill polygons (in this case U.S. States) from
and ESRI shapefile. 

hurrtrack.py plots hurricane tracks from shapefile data 
(from nationalatlas.gov).

testgdal.py is an example that shows how to plot raster geospatial data
using the gdal module (http://gdal.maptools.org).  Requires two data
files that must be downloaded manually, see docstrings for URLs.

panelplot.py shows how to make multi-panel plots, taking special care to 
make sure that map aspect ratios are preserved (so you don't get squished
and/or stretched maps).

polarmaps.py illustrates the use of the special-case versions of the 
stereographic, lambert azimuthal equal area, azimuthal equidistant 
projections (prefixed by 'np' and 'sp').

warpimage.py shows how to interpolate (warp) an image from one
map projection to another. Requires PIL, and an image from
http://www.space-graphics.com/earth_topo-bathy.htm, 

garp.py makes a 'World According to Garp' map - an azimuthal equidistant
projection centered on a specified location.  Straight lines from that
location to any point on the map have true scale and show the shortest
route.  Shows how to use the 'width' and 'height' keywords
to specify the map projection region (instead of specifying
the lat/lon of the upper right and lower left corners).

More examples of using the 'width' and 'height' keywords (instead of
'llcrnrlat','llcrnrlon','urcrnrlat','urcrnrlon') are given in setwh.py.

plot_tissot.py - tissot's indicatrix, shows the distorting effects of
different map projections. Exercises the shapefile methods.

pnganim.py shows how to make an animation.

ccsm_popgrid.py shows how to plot data on 2d grids which are not 
rectilinear in map projection or geographic coordinates.  The NCAR
Parallel Ocean Program grid is used as an example.

show_colormaps.py plots the extra colormaps included with basemap.

plotprecip.py use nonlinear precip colormap included with basemap
to make a rainfall plot.

run_all.py is a driver script that runs all the examples except fcstmaps.py,
testgdal.py, geos_demo_2.py, warpimage.py, and pnganim.py (which
rely on external dependencies and/or an internet connection).
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.