Menu

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

HTTPS access


File Date Author Commit
 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 2006-12-13 jswhit [r2920] update
 ccsm_popgrid.nc 2006-10-10 jswhit [r2801] new example from Ivan Lima (CCSM POP grid)
 ccsm_popgrid.py 2006-12-14 jswhit [r2926] update
 contour_demo.py 2006-07-25 jswhit [r2611] don't use single character Numeric typecodes.
 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 2006-11-18 jswhit [r2883] can provide date on command line.
 fillstates.py 2006-06-09 jswhit [r2459] update shape files.
 garp.py 2007-01-05 jswhit [r2970] remove unneeded import
 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 2006-06-09 jswhit [r2460] update for hurricanes thru 2004
 ireland.py 2006-03-23 jswhit [r2225] remove deprecated createfigure calls.
 land_shallow_topo_2048.jpg 2006-07-26 jswhit [r2614] image for warpimage.py demo
 nytolondon.py 2006-03-23 jswhit [r2225] remove deprecated createfigure calls.
 ortho_demo.py 2006-05-03 jswhit [r2381] rgba tuples now ints, not floats.
 panelplot.py 2006-07-25 jswhit [r2611] don't use single character Numeric typecodes.
 plot_tissot.py 2006-11-08 jswhit [r2863] add reference
 plotmap.py 2006-07-25 jswhit [r2611] don't use single character Numeric typecodes.
 plotmap_masked.py 2006-07-25 jswhit [r2611] don't use single character Numeric typecodes.
 plotmap_oo.py 2006-07-25 jswhit [r2611] don't use single character Numeric typecodes.
 pnganim.py 2006-07-25 jswhit [r2608] Don't use Numeric single character typecodes.
 polarmaps.py 2006-07-25 jswhit [r2611] don't use single character Numeric typecodes.
 pupynere.py 2006-12-31 jswhit [r2950] update
 quiver_demo.py 2006-07-25 jswhit [r2609] Don't use single character Numeric typecodes
 randompoints.py 2006-07-13 jswhit [r2561] make points have random colors.
 run_all.py 2007-01-05 jswhit [r2971] exclude pupynere.py
 setwh.py 2006-08-31 jswhit [r2733] remove 'tmerc' example (for now)
 simpletest.py 2006-07-25 jswhit [r2611] don't use single character Numeric typecodes.
 simpletest_oo.py 2006-07-25 jswhit [r2611] don't use single character Numeric typecodes.
 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 2006-07-25 jswhit [r2610] don't use single character Numeric typecodes
 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 2006-07-26 jswhit [r2616] make coastlines gray instead of black
 wiki_example.py 2006-03-23 jswhit [r2225] remove deprecated createfigure calls.

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.

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)

ireland.py draws maps of ireland with the crude, low and intermediate
resolution boundary datasets. It also 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.

fcstmaps.py is a sample multi-panel plot.  Care is taken to preserve the aspect ratio of the map in each panel, and a common title and colorbar is created.  
Requires the opendap module (http://opendap.oceanografia.org) and an 
active internet connection to fetch the data to be plotted.

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.

run_all.py is a driver script that runs all the examples except fcstmaps.py,
testgdal.py, warpimage.py, and pnganim.py (which
rely on external dependencies).

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.