Skip to content

Commit 0cfb551

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents f442857 + 1d7664c commit 0cfb551

File tree

1,444 files changed

+562681
-587059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,444 files changed

+562681
-587059
lines changed

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#########################################
2+
# Editor temporary/working/backup files #
3+
.#*
4+
[#]*#
5+
*~
6+
*$
7+
*.bak
8+
.project
9+
.pydevproject
10+
11+
# Compiled source #
12+
###################
13+
*.a
14+
*.com
15+
*.class
16+
*.dll
17+
*.exe
18+
*.o
19+
*.py[ocd]
20+
*.so
21+
22+
# Python files #
23+
################
24+
# setup.py working directory
25+
build
26+
# sphinx build directory
27+
doc/_build
28+
# setup.py dist directory
29+
dist
30+
# Egg metadata
31+
*.egg-info
32+
# tox testing tool
33+
.tox
34+
35+
# OS generated files #
36+
######################
37+
.gdb_history
38+
.DS_Store?
39+
ehthumbs.db
40+
Icon?
41+
Thumbs.db
42+
43+
# Things specific to this project #
44+
###################################
45+
nad2bin
46+
examples/*.png
47+
*.pickle
48+
49+
# output of nad2bin
50+
lib/mpl_toolkits/basemap/data/FL
51+
lib/mpl_toolkits/basemap/data/MD
52+
lib/mpl_toolkits/basemap/data/TN
53+
lib/mpl_toolkits/basemap/data/WI
54+
lib/mpl_toolkits/basemap/data/WO
55+
lib/mpl_toolkits/basemap/data/alaska
56+
lib/mpl_toolkits/basemap/data/conus
57+
lib/mpl_toolkits/basemap/data/hawaii
58+
lib/mpl_toolkits/basemap/data/null
59+
lib/mpl_toolkits/basemap/data/prvi
60+
lib/mpl_toolkits/basemap/data/stgeorge
61+
lib/mpl_toolkits/basemap/data/stlrnc
62+
lib/mpl_toolkits/basemap/data/stpaul
63+
64+
# Documentation generated files #
65+
#################################
66+
doc/examples
67+
doc/_templates/gallery.html
68+
doc/users/installing.rst
69+
doc/_static/matplotlibrc

API_CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
version 1.0.6: Added drawcounties,arcgisimage methods.
2+
version 1.0.5: Added 'latlon' keyword to plotting methods (converts lat/lon to x/y
3+
and shifts data in longitude (using shiftdata method) to map projection region.
4+
version 1.0.3: Added streamplot method.
15
version 1.0.2: default value for lakes kwarg in drawlsmask changed from False to True.
26
default value for inlands kwarg in maskoceans changed from False to True.
37
NetCDFFile function removed.

Changelog

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,131 @@
1+
version 1.0.7 (git tag v1.0.7rel)
2+
---------------------------------
3+
* include mpl_toolkits/__init__.py, since the one installed by matplotlib
4+
is now inaccessible inside an egg (in 1.4.x). Make basemap a 'namespace
5+
package'. Issue 114.
6+
* fix drawmeridians so meridians reach edge of plot when map projection region
7+
is *very* small (issue 113).
8+
* update pyproj (with fixes to geodesic calculations).
9+
* support for rotated pole transformation (projection = 'rotpole').
10+
* fix warpimage with projection = 'hammer' (issue 100).
11+
* fix tolerances for detecting jumps in meridians and parallels for
12+
cyl and rotpole projections (issue 108).
13+
* fix clipping to map projection region done in contourf and contour methods
14+
so it doesn't assume x and y are increasing (issue 110).
15+
16+
version 1.0.6 (git tag v1.0.6rel)
17+
--------------------------------
18+
* fix drawcounties for Python 3.3.
19+
* update pyproj to version 1.9.3 (remove geographiclib python code, replace
20+
with C code from proj4).
21+
* in contourf and contour, all points outside the map projection
22+
region were masked. This meant that if a grid cell was partly inside and partly
23+
outside the map projection region, nothing was drawn, leaving a gap along the
24+
edge of the map. This was particularly noticeable for very coarse resolution grids.
25+
This commit only masks those points more than one grid length beyond the edge
26+
of the map projection region. Fixes issue 88.
27+
* allow for latitude values slightly greater than 90 to exist in shapefiles,
28+
(by truncating to 90). Still raise exception if latitude exceeds 90.01.
29+
* added 'wmsimage' method for displaying background image retrieved from
30+
a OGC-compliant WMS server using OWSLib (http://pypi.python.org/OWSLib)
31+
(requires using 'epsg' keyword to define projection).
32+
* fix drawing of meridians and parallels for very small map regions
33+
(issue 79).
34+
* add module variable 'latlon_default' that can be used to switch
35+
default value of latlon kwarg to True so plotting methods can be
36+
passed lats and lons (geographic coordinatsin degrees) instead
37+
of x,y (projection coordinates).
38+
* have drawcoastlines use line segments instead of coastline polygons, to
39+
avoid 'thickening' of lines around edges of map.
40+
* added support for cylindrical equal area ('cea') projection.
41+
* add 'arcgisimage' method for displaying background image retrieved from
42+
an ArcGIS server using the REST API
43+
(requires using 'epsg' keyword to define projection).
44+
* add 'epsg' keyword for defining projections.
45+
* add 'ellps' keyword (rsphere ignored if ellps given).
46+
* fixed shiftdata method so it shifts mask along with data
47+
(https://github.com/matplotlib/basemap/pull/68).
48+
* added linestyle keyword to all draw* methods.
49+
* added 'drawcounties' method (https://github.com/matplotlib/basemap/pull/65)
50+
thanks to Patrick Marsh.
51+
* fix bug that caused plotting to fail when latlon keyword is
52+
explicitly set to False (https://github.com/matplotlib/basemap/pull/66).
53+
* add latlon keyword to plot and scatter methods
54+
(https://github.com/matplotlib/basemap/pull/64).
55+
56+
version 1.0.5 (git tag v1.0.5rel)
57+
---------------------------------
58+
* fix bug triggered when drawlsmask method called more than once.
59+
* fix error in contour method that caused a bogus mask to be applied
60+
to the data (issue 58).
61+
* fix further corner cases with splitting of parallels that cross
62+
the dateline (issue 40).
63+
* add latlon keyword to plotting methods. If latlon=True, x and y
64+
values are assumed to longitudes and latitudes in degrees. The
65+
data and longitudes are shifted to the map projection region (for
66+
cylindrical and pseudo-cylindrical projections) using the shiftdata
67+
method, and lons/lats are converted to map projection coords. Default
68+
value is False. Addresses issue 54. New example shiftdata.py added
69+
to illustrate usage.
70+
* fix bluemarble and warpimage methods to account for change in orientation
71+
of arrays returned to matplotlib's pil_to_array (issue 51)
72+
* fix glitch with drawing meridians and filling coastline polygons with
73+
omerc projection that includes pole.
74+
75+
version 1.0.4 (git tag v1.0.4rel)
76+
--------------------------------
77+
* fix bug that caused Europe coastlines to disappear from some maps
78+
(evident from nytolondon.py example).
79+
* fix splitting of parallels in conic projections that cross the dateline
80+
(issue 40).
81+
82+
version 1.0.3 (git tag v1.0.3rel)
83+
------------------------------
84+
* fix some more python 3 compatibility issues (all examples now
85+
work with python 3.2).
86+
* added alpha keyword to fillcontinents (to set transparency).
87+
* update geos from 3.3.1 to 3.3.3.
88+
* upgrade proj4 source to version 4.8.0, pyproj to version 1.9.2.
89+
* add k_0 keyword for projection = 'tmerc' so UTM zones can be
90+
created. Also can be used with 'lcc','omerc' and 'stere'.
91+
Added "utmtest.py" example.
92+
* add streamplot method, along with streamplot_demo.py example.
93+
* add boundarylats, boundarylons Basemap attributes (arrays
94+
describing map boundaries - useful for illustrating map projection
95+
region on another map). Example illustrating usage
96+
(make_inset.py) added.
97+
* update coastlines, rivers, political boundaries to GSHHS
98+
2.2.0/GMT 4.5.7. The fillcontinents bug (filling the outside
99+
instead of the inside of a coastline polygon) is now much
100+
harder to trigger.
101+
* add 'round' keyword keyword to Basemap.__init__ for pole-centered
102+
projections to make them round (clipped at boundinglat) instead
103+
of square.
104+
* added hexbin method, along with hexbin_demo.py example.
105+
* drawmapboundary now uses axes bgcolor as default fill_color. If
106+
no color fill wanted, set fill_color='none' (a string).
107+
* clip coastlines for nplaea,npaeqd,splaea,spaeqd in stereographic
108+
coordinates to avoid S. America disappearing in some south polar
109+
plots.
110+
* fix broken daynight terminator function.
111+
* added kav7 (Kavrayskiy VII) and eck4 (Eckert IV) projections
112+
(https://github.com/matplotlib/basemap/issues/9).
113+
* update pyproj source from pyproj.googlecode.com. Includes
114+
new more robust and accurate pure python code for geodesic computations
115+
from geographiclib.
116+
* bug fixes for celestial projections, and non-standard sphere
117+
radii (https://github.com/matplotlib/basemap/pull/6).
118+
* fix bug in drawparallels that results in 'KeyError' when drawing
119+
parallels very close together (0.1 degrees).
120+
* fix constant in Robinson projection (update PJ_robin.c
121+
from proj4 svn).
122+
* fix typo in setup.py (replace "!= ['sdist','clean']" with
123+
"not in ['sdist','clean']").
124+
* make sure drawmeridians can handle wrap-around (so that
125+
if projection is defined in -180 to 0 and user asks for
126+
meridians from 180 to 360 to be drawn, it should work).
127+
Only affects projections 'mill','gall','merc' and 'cyl'.
128+
1129
version 1.0.2 (git tag v1.0.2)
2130
* update include geos from 3.2.0 to 3.3.1 so it compiles with gcc
3131
4.6.

KNOWN_BUGS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
* The fillcontinents method doesn't always do the right thing. Matplotlib
22
always tries to fill the inside of a polygon. Under certain situations,
33
what is the inside of a coastline polygon can be ambiguous, and the
4-
outside may be filled instead of the inside. To trigger this,
5-
run the ortho_demo.py example with lon=-120,lat=60.
6-
Workaround - mask the land areas with the drawlsmask method instead of
4+
outside may be filled instead of the inside.
5+
Workarounds - change the map projection region slightly or
6+
mask the land areas with the drawlsmask method instead of
77
filling the coastline polygons (this is illustrated in the ortho_demo.py example).

LICENSE_geographiclib

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Copyright (c) Charles Karney (2011) <[email protected]> and licensed
2+
under the MIT/X11 License. For more information, see
3+
http://geographiclib.sourceforge.net/

MANIFEST.in

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ include Changelog
1111
include setup.py
1212
include nad2bin.c
1313
include src/*
14+
include examples/testarcgis.py
15+
include examples/testwmsimage.py
16+
include examples/counties.py
17+
include examples/shiftdata.py
1418
include examples/allskymap.py
1519
include examples/allskymap_cr_example.py
1620
include examples/plothighsandlows.py
@@ -64,7 +68,9 @@ include examples/run_all.py
6468
include examples/polarmaps.py
6569
include examples/warpimage.py
6670
include examples/earth_lights_lrg.jpg
67-
include examples/pnganim.py
71+
include examples/animate.py
72+
include examples/hexbin_demo.py
73+
include examples/make_inset.py
6874
include examples/garp.py
6975
include examples/setwh.py
7076
include examples/ccsm_popgrid.py
@@ -75,11 +81,15 @@ include examples/cities.shx
7581
include examples/show_colormaps.py
7682
include examples/plotprecip.py
7783
include examples/lic_demo.py
84+
include examples/streamplot_demo.py
7885
include examples/nws_precip_conus_20061222.nc
7986
include examples/C02562.orog.nc
8087
include examples/ccsm_popgrid.nc
8188
include examples/rita.nc
8289
include examples/maskoceans.py
90+
include examples/utmtest.py
91+
include examples/test_rotpole.py
92+
include examples/wm201_Arctic_JJA_1990-2008_moyenneDesMoyennes.nc
8393
include examples/README
8494
include lib/mpl_toolkits/__init__.py
8595
include lib/mpl_toolkits/basemap/__init__.py
@@ -96,5 +106,5 @@ include doc/README.txt
96106
include doc/make.py
97107
include doc/conf.py
98108
include doc/index.rst
99-
recursive-include geos-3.3.1 *
109+
recursive-include geos-3.3.3 *
100110
recursive-include lib/mpl_toolkits/basemap/data *

README

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ using matplotlib.
55

66
**Requirements**
77

8-
python 2.4 (or higher)
8+
python 2.5 (or higher)
99

10-
matplotlib 1.0.1 (or higher)
10+
matplotlib
1111

12-
numpy 1.4 (or higher)
12+
numpy
1313

1414
The GEOS (Geometry Engine - Open Source) library (version 3.1.1 or higher).
15-
Source code is included in the geos-3.3.1 directory.
15+
Source code is included in the geos-3.3.3 directory.
1616

1717
PIL (http://pythonware.com/products/pil) is optional (only
1818
needed for Basemap warpimage and bluemarble methods).
@@ -27,8 +27,12 @@ C extensions.
2727
source code from proj.4 (http://proj.maptools.org) is included in the
2828
'src' directory under the terms given in LICENSE_proj4.
2929

30+
source code from geographiclib (http://pypi.python.org/pypi/geographiclib)
31+
is included in the 'lib/mpl_toolkits/basemap' directory under the terms
32+
given in LICENSE_geographiclib.
33+
3034
source code for the GEOS library is
31-
included in the 'geos-3.3.1' directory under the terms given in
35+
included in the 'geos-3.3.3' directory under the terms given in
3236
LICENSE_geos.
3337

3438
shapefile.py from pyshp.googlecode.com is included under the terms given
@@ -39,8 +43,8 @@ from datasets provided with the Generic Mapping Tools
3943
(http://gmt.soest.hawaii.edu)
4044
and are included under the terms given in LICENSE_data.
4145

42-
Everything else (including src/_proj.pyx, src/_geod.pyx, src/_pyproj.pxi,
43-
src/_proj.c, src/_geod.c, src/_geos.c, and src/_geos.pyx):
46+
Everything else (including src/_proj.pyx,,
47+
src/_proj.c, src/_geos.c, and src/_geos.pyx):
4448

4549
copyright (c) 2011 by Jeffrey Whitaker.
4650

@@ -59,7 +63,7 @@ PERFORMANCE OF THIS SOFTWARE.
5963

6064
**Documentation**
6165

62-
see http://matplotlib.gitub.net/basemap.
66+
see http://matplotlib.github.com/basemap/
6367

6468
see scripts in 'examples' directory for example usage.
6569

@@ -80,7 +84,7 @@ geos_c.h is in /usr/local/include, set GEOS_DIR to /usr/local).
8084
Then go to step (3). If you don't have it, you can build it from
8185
the source code included with basemap by following these steps:
8286

83-
> cd geos-3.3.1
87+
> cd geos-3.3.3
8488
> export GEOS_DIR=<where you want the libs and headers to go>
8589
A reasonable choice on a Unix-like system is /usr/local, or
8690
if you don't have permission to write there, your home directory.
@@ -123,5 +127,7 @@ Christoph Gohlke
123127
Eric Bruning
124128
Stephane Raynaud
125129
Tom Loredo
130+
Patrick Marsh
131+
Phil Elson
126132

127133
for valuable contributions.

doc/conf.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323

2424
# Add any Sphinx extension module names here, as strings. They can be extensions
2525
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
26-
extensions = ['sphinx.ext.autodoc']
26+
extensions = ['sphinx.ext.autodoc',
2727
#extensions = ['matplotlib.sphinxext.mathmpl',
2828
# 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives',
29-
# 'matplotlib.sphinxext.plot_directive',
29+
'matplotlib.sphinxext.plot_directive',
3030
# 'sphinx.ext.inheritance_diagram',
31-
# 'matplotlib.sphinxext.ipython_console_highlighting']
31+
# 'matplotlib.sphinxext.ipython_console_highlighting',
32+
]
3233

3334
# Add any paths that contain templates here, relative to this directory.
3435
templates_path = ['_templates']
@@ -47,9 +48,10 @@
4748
# other places throughout the built documents.
4849
#
4950
# The short X.Y version.
50-
version = '1.0.2'
51+
from mpl_toolkits.basemap import __version__ as bmversion
52+
version = bmversion
5153
# The full version, including alpha/beta/rc tags.
52-
release = '1.0.2'
54+
release = bmversion
5355

5456
# There are two options for replacing |today|: either, you set today to some
5557
# non-false value, then it is used:
@@ -94,7 +96,7 @@
9496
# Add any paths that contain custom static files (such as style sheets) here,
9597
# relative to this directory. They are copied after the builtin static files,
9698
# so a file named "default.css" will overwrite the builtin "default.css".
97-
html_static_path = ['_static']
99+
#html_static_path = ['_static']
98100

99101
# If nonempty, this is the file name suffix for generated HTML files. The
100102
# default is ``".html"``.
@@ -164,3 +166,14 @@
164166
# Show both class-level docstring and __init__ docstring in class
165167
# documentation
166168
autoclass_content = 'both'
169+
170+
171+
172+
173+
################ plot directive configurations #####################
174+
plot_html_show_formats = False
175+
plot_include_source = True
176+
plot_rcparams = {'figure.figsize':[8, 6]}
177+
plot_formats = [('png', 100), # pngs for html building
178+
('pdf', 72), # pdfs for latex building
179+
]

0 commit comments

Comments
 (0)