Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2009-11-23 11:59:20
Size: 494
Editor: anonymous
Comment:
Revision 5 as of 2009-11-23 12:02:21
Size: 718
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
The [[http://matplotlib.sourceforge.net/basemap/doc/html/| matplotlib basemap toolkit]] is a library for plotting 2D data on maps in Python.
Line 14: Line 15:
{{{!#python http://matplotlib.sourceforge.net/basemap/doc/html/

{{attachment:Map1.png}}

{{{#!python

Visualisation

Basemap

The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python.

http://matplotlib.sourceforge.net/basemap/doc/html/

Map1.png

Toggle line numbers
   1 from pylab import *
   2 from mpl_toolkits.basemap import Basemap
   3 
   4 m = Basemap(projection='ortho',lon_0=10.0,lat_0=45.0,resolution='l')
   5 m.bluemarble()
   6 
   7 lon,lat=10.0,53.5 # Hamburg
   8 
   9 x,y=m(lon,lat)
  10 m.plot(x,y,'r.')
  11     
  12 show()
  13 savefig('Map1.png',dpi=75)

LehreWiki: OpenSource2010/Lesson6 (last edited 2010-11-22 12:55:36 by anonymous)