You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
| 2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
| 2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
| 2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jd...@us...> - 2008-10-07 15:14:54
|
Revision: 6166
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6166&view=rev
Author: jdh2358
Date: 2008-10-07 15:13:53 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
added michaels unit detection optimization for arrays
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/units.py
Modified: trunk/matplotlib/lib/matplotlib/units.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/units.py 2008-10-07 15:13:13 UTC (rev 6165)
+++ trunk/matplotlib/lib/matplotlib/units.py 2008-10-07 15:13:53 UTC (rev 6166)
@@ -135,7 +135,7 @@
for thisx in x:
converter = self.get_converter( thisx )
- if converter: break
+ return converter
#DISABLED self._cached[idx] = converter
return converter
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-10-07 06:34:12
|
Revision: 6164
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6164&view=rev
Author: efiring
Date: 2008-10-07 06:31:29 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
fix typos
Modified Paths:
--------------
trunk/htdocs/interactive.html.template
trunk/htdocs/whats_new.html.template
Modified: trunk/htdocs/interactive.html.template
===================================================================
--- trunk/htdocs/interactive.html.template 2008-10-07 00:50:17 UTC (rev 6163)
+++ trunk/htdocs/interactive.html.template 2008-10-07 06:31:29 UTC (rev 6164)
@@ -44,7 +44,7 @@
<pre>
peds-pc311:~> ipython -pylab
-Python 2.3.3 (#2, Apr 13 2004, 17:41:29)
+Python 2.3.3 (#2, Apr 13 2004, 17:41:29)
Type "copyright", "credits" or "license" for more information.
IPython 0.6.5 -- An enhanced Interactive Python.
@@ -74,10 +74,10 @@
/home/jdhunter/python/projects/matplotlib/examples/pylab
>>> run simple_plot.py
>>> title('a new title', color='r')
-</pre>
+</pre>
The pylab interface provides 4 commands that are useful for
-interactive control. Note again that the interactgive setting
+interactive control. Note again that the interactive setting
primarily controls whether the figure is redrawn with each plotting
command. <a
href=matplotlib.pyplot.html#-isinteractive>isinteractive</a> returns
@@ -109,7 +109,7 @@
<pre>
>>> import matplotlib
>>> matplotlib.interactive(True)
- >>> matplotlib.use('WX')
+ >>> matplotlib.use('WX')
>>> from matplotlib.pylab import *
>>> plot([1,2,3])
>>> xlabel('time (s)')
@@ -120,7 +120,7 @@
<pre>
backend : Wx
-interactive : True
+interactive : True
</pre>
Modified: trunk/htdocs/whats_new.html.template
===================================================================
--- trunk/htdocs/whats_new.html.template 2008-10-07 00:50:17 UTC (rev 6163)
+++ trunk/htdocs/whats_new.html.template 2008-10-07 06:31:29 UTC (rev 6164)
@@ -12,7 +12,7 @@
('external backends', """backend developers and users can now use custom backends outside the matplotlib tree, by using the special syntax <pre>module://my_backend</pre> for the backend setting in the rc file, the use directive, or in -d command line argument to pylab/pyplot scripts"""),
-('findobj', """Introduced a recursive object search method to find all objects that meet some matching criterion, ef to find all text instances in a figure. See <a href=examples/pylab_examples/findobj_demo.py>fondobj_demo.py</a>"""),
+('findobj', """Introduced a recursive object search method to find all objects that meet some matching criterion, e.g. to find all text instances in a figure. See <a href=examples/pylab_examples/findobj_demo.py>findobj_demo.py</a>"""),
('tons of bug fixes', """Many critical bugfixes affecting memory leaks, math rendering, UI specific problems and more. For details, see the <a href=CHANGELOG>CHANGELOG</a>""")
@@ -67,7 +67,7 @@
to <a href=matplotlib.patches.html#Arc-draw>elliptical arcs</a> in the
viewport. This provides a scale free, accurate graph of the arc
regardless of zoom level.
-See <a href=screenshots.html#ellipse_demo>ellipse_demo
+See <a href=screenshots.html#ellipse_demo>ellipse_demo
screenshot</a>."""),
('imread enhanced', """<a href=matplotlib.image.html#-imread>imread</a> now will use PIL when available to load images and return numpy arrays"""),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-07 03:23:54
|
Revision: 6161
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6161&view=rev
Author: jswhit
Date: 2008-10-07 00:46:26 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
fix url
Modified Paths:
--------------
trunk/toolkits/basemap/examples/plotsst.py
Modified: trunk/toolkits/basemap/examples/plotsst.py
===================================================================
--- trunk/toolkits/basemap/examples/plotsst.py 2008-10-07 00:38:35 UTC (rev 6160)
+++ trunk/toolkits/basemap/examples/plotsst.py 2008-10-07 00:46:26 UTC (rev 6161)
@@ -10,9 +10,9 @@
else:
date = sys.argv[1]
if date[0:4] > '2005':
- ncfile = NetCDFFile('http://nomads.ncdc.noaa.gov:8085/thredds/dodsC/oisst/'+date[0:4]+'/AVHRR/sst4-navy-eot.'+date+'.nc')
+ ncfile = NetCDFFile('http://nomads.ncdc.noaa.gov/thredds/dodsC/oisst/'+date[0:4]+'/AVHRR/sst4-navy-eot.'+date+'.nc')
else:
- ncfile = NetCDFFile('http://nomads.ncdc.noaa.gov:8085/thredds/dodsC/oisst/'+date[0:4]+'/AVHRR/sst4-path-eot.'+date+'.nc')
+ ncfile = NetCDFFile('http://nomads.ncdc.noaa.gov/thredds/dodsC/oisst/'+date[0:4]+'/AVHRR/sst4-path-eot.'+date+'.nc')
# read sst. Will automatically create a masked array using
# missing_value variable attribute.
sst = ncfile.variables['sst'][:]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-07 00:51:15
|
Revision: 6163
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6163&view=rev
Author: jswhit
Date: 2008-10-07 00:50:17 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
update URL
Modified Paths:
--------------
trunk/toolkits/basemap/examples/fcstmaps.py
Modified: trunk/toolkits/basemap/examples/fcstmaps.py
===================================================================
--- trunk/toolkits/basemap/examples/fcstmaps.py 2008-10-07 00:47:05 UTC (rev 6162)
+++ trunk/toolkits/basemap/examples/fcstmaps.py 2008-10-07 00:50:17 UTC (rev 6163)
@@ -15,7 +15,8 @@
YYYYMMDD = datetime.datetime.today().strftime('%Y%m%d')
# set OpenDAP server URL.
-URLbase="http://nomad3.ncep.noaa.gov:9090/dods/mrf/mrf"
+#URLbase="http://nomad3.ncep.noaa.gov:9090/dods/mrf/mrf"
+URLbase="http://nomad5.ncep.noaa.gov:9090/dods/nomad1-raid2/mrf/mrf"
URL=URLbase+YYYYMMDD+'/mrf'+YYYYMMDD
print URL+'\n'
try:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-07 00:48:07
|
Revision: 6162
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6162&view=rev
Author: jswhit
Date: 2008-10-07 00:47:05 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
remove plotsst.py from automatic tests
Modified Paths:
--------------
trunk/toolkits/basemap/examples/run_all.py
Modified: trunk/toolkits/basemap/examples/run_all.py
===================================================================
--- trunk/toolkits/basemap/examples/run_all.py 2008-10-07 00:46:26 UTC (rev 6161)
+++ trunk/toolkits/basemap/examples/run_all.py 2008-10-07 00:47:05 UTC (rev 6162)
@@ -5,6 +5,7 @@
test_files.remove('testgdal.py')
test_files.remove('pnganim.py')
test_files.remove('geos_demo_2.py')
+test_files.remove('plotsst.py')
print test_files
py_path = os.environ.get('PYTHONPATH')
if py_path is None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-07 00:41:31
|
Revision: 6160
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6160&view=rev
Author: jswhit
Date: 2008-10-07 00:38:35 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
fix pickling
Modified Paths:
--------------
trunk/toolkits/basemap/setup.py
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py 2008-10-06 19:18:09 UTC (rev 6159)
+++ trunk/toolkits/basemap/setup.py 2008-10-07 00:38:35 UTC (rev 6160)
@@ -81,15 +81,19 @@
package_dirs = {'':'lib'}
extensions = [Extension("mpl_toolkits.basemap._proj",deps+['src/_proj.c'],include_dirs = ['src'],)]
extensions.append(Extension("mpl_toolkits.basemap._geod",deps+['src/_geod.c'],include_dirs = ['src'],))
+# can't install _geoslib in mpl_toolkits.basemap namespace,
+# or Basemap objects won't be pickleable.
if sys.platform == 'win32':
# don't use runtime_library_dirs on windows (workaround
# for a distutils bug - http://bugs.python.org/issue2437).
- extensions.append(Extension("mpl_toolkits.basemap._geoslib",['src/_geoslib.c'],
+ #extensions.append(Extension("mpl_toolkits.basemap._geoslib",['src/_geoslib.c'],
+ extensions.append(Extension("_geoslib",['src/_geoslib.c'],
library_dirs=geos_library_dirs,
include_dirs=geos_include_dirs,
libraries=['geos_c','geos']))
else:
- extensions.append(Extension("mpl_toolkits.basemap._geoslib",['src/_geoslib.c'],
+ #extensions.append(Extension("mpl_toolkits.basemap._geoslib",['src/_geoslib.c'],
+ extensions.append(Extension("_geoslib",['src/_geoslib.c'],
library_dirs=geos_library_dirs,
runtime_library_dirs=geos_library_dirs,
include_dirs=geos_include_dirs,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-06 21:23:01
|
Revision: 6159
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6159&view=rev
Author: jdh2358
Date: 2008-10-06 19:18:09 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
added resize event support to tkagg
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
trunk/matplotlib/lib/matplotlib/figure.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2008-10-06 12:06:30 UTC (rev 6158)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2008-10-06 19:18:09 UTC (rev 6159)
@@ -208,6 +208,7 @@
self._tkphoto = Tk.PhotoImage(
master=self._tkcanvas, width=width, height=height)
self._tkcanvas.create_image(width/2,height/2,image=self._tkphoto)
+ self.resize_event()
self.show()
def draw(self):
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py 2008-10-06 12:06:30 UTC (rev 6158)
+++ trunk/matplotlib/lib/matplotlib/figure.py 2008-10-06 19:18:09 UTC (rev 6159)
@@ -711,7 +711,7 @@
def clear(self):
"""
- Clear the figure
+ Clear the figure -- synonym for fig.clf
"""
self.clf()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-06 12:06:35
|
Revision: 6158
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6158&view=rev
Author: jswhit
Date: 2008-10-06 12:06:30 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
update for new projections.
Modified Paths:
--------------
trunk/toolkits/basemap/doc/users/intro.rst
Modified: trunk/toolkits/basemap/doc/users/intro.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/intro.rst 2008-10-06 12:04:58 UTC (rev 6157)
+++ trunk/toolkits/basemap/doc/users/intro.rst 2008-10-06 12:06:30 UTC (rev 6158)
@@ -11,7 +11,7 @@
`CDAT <http://www-pcmdi.llnl.gov/software/cdat/support/vcs/vcs.html>`_
are other libraries that provide similar capabilities in Python.
-Basemap does not do any plotting on it's own, but provides the facilities to transform coordinates to one of 19 different map projections (using the
+Basemap does not do any plotting on it's own, but provides the facilities to transform coordinates to one of 22 different map projections (using the
`PROJ.4 <http://trac.osgeo.org/proj/>`_ C library). `Matplotlib
<http://matplotlib.sourceforge.net>`_ is then
used to plot contours, images, vectors, lines or points
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-06 12:05:10
|
Revision: 6157
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6157&view=rev
Author: jswhit
Date: 2008-10-06 12:04:58 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
update for new projections
Modified Paths:
--------------
trunk/toolkits/basemap/doc/users/graticule.rst
Modified: trunk/toolkits/basemap/doc/users/graticule.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/graticule.rst 2008-10-06 12:02:07 UTC (rev 6156)
+++ trunk/toolkits/basemap/doc/users/graticule.rst 2008-10-06 12:04:58 UTC (rev 6157)
@@ -10,11 +10,13 @@
The longitude and latitude lines can be labelled where they
the map projection boundary. There are four exceptions: meridians
and parallels cannot be labelled on maps with
-``proj`` set to ``ortho`` (orthographic projection),
+``proj`` set to ``ortho`` (orthographic) or
+``vandg`` (van der Grinten),
and meridians cannot be labelled on maps with
-``proj`` set to ``robin`` (robinson), ``moll`` (mollweide) or ``sinu``
+``proj`` set to ``robin`` (robinson), ``mbtfpq``
+(McBryde-Thomas Flat Polar Quartic), ``moll`` (mollweide) or ``sinu``
(sinusoidal). This is because the lines can be very close
together where they intersect the boundary on these maps, so that
-they really need to be labelled on the interior of the plot.
+they really need to be labelled manually on the interior of the plot.
.. toctree::
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-06 12:02:21
|
Revision: 6156
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6156&view=rev
Author: jswhit
Date: 2008-10-06 12:02:07 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
fix typo
Modified Paths:
--------------
trunk/toolkits/basemap/README
Modified: trunk/toolkits/basemap/README
===================================================================
--- trunk/toolkits/basemap/README 2008-10-05 13:38:11 UTC (rev 6155)
+++ trunk/toolkits/basemap/README 2008-10-06 12:02:07 UTC (rev 6156)
@@ -58,7 +58,7 @@
**Documentation**
-see docstrings and http://matplotlib.sf.net/basemap/doc/html/.
+see http://matplotlib.sf.net/basemap/doc/html/.
see scripts in 'examples' directory for example usage.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-05 13:39:13
|
Revision: 6155
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6155&view=rev
Author: jswhit
Date: 2008-10-05 13:38:11 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
docstring formatting fixes
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-10-05 13:33:26 UTC (rev 6154)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-10-05 13:38:11 UTC (rev 6155)
@@ -174,7 +174,7 @@
(because either they are computed internally, or entire globe is
always plotted).
- For the cylindrical projections (``cyl``, ``merc``,``mill`` and ``gall``),
+ For the cylindrical projections (``cyl``, ``merc``, ``mill`` and ``gall``),
the default is to use
llcrnrlon=-180,llcrnrlat=-90, urcrnrlon=180 and urcrnrlat=90). For all other
projections except ``ortho`` and ``geos``, either the lat/lon values of the
@@ -798,7 +798,7 @@
For non-cylindrical projections, the inverse transformation
always returns longitudes between -180 and 180 degrees. For
cylindrical projections (self.projection == ``cyl``,
- ``mill``,``gall`` or ``merc``)
+ ``mill``, ``gall`` or ``merc``)
the inverse transformation will return longitudes between
self.llcrnrlon and self.llcrnrlat.
@@ -2294,7 +2294,7 @@
lons, lats rank-1 arrays containing longitudes and latitudes
(in degrees) of input data in increasing order.
For non-cylindrical projections (those other than
- ``cyl``, ``merc``,``gall`` and ``mill``) lons must
+ ``cyl``, ``merc``, ``gall`` and ``mill``) lons must
fit within range -180 to 180.
nx, ny The size of the output regular grid in map
projection coordinates
@@ -2365,7 +2365,7 @@
lons, lats rank-1 arrays containing longitudes and latitudes
(in degrees) of input data in increasing order.
For non-cylindrical projections (those other than
- ``cyl``, ``merc``,``gall`` and ``mill``) lons must
+ ``cyl``, ``merc``, ``gall`` and ``mill``) lons must
fit within range -180 to 180.
nx, ny The size of the output regular grid in map
projection coordinates
@@ -2437,7 +2437,7 @@
lons, lats Arrays containing longitudes and latitudes
(in degrees) of input data in increasing order.
For non-cylindrical projections (those other than
- ``cyl``, ``merc``,``gall`` and ``mill``) lons must
+ ``cyl``, ``merc``, ``gall`` and ``mill``) lons must
fit within range -180 to 180.
============== ====================================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-05 13:36:08
|
Revision: 6154
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6154&view=rev
Author: jswhit
Date: 2008-10-05 13:33:26 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
docstring updates.
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-10-05 13:31:43 UTC (rev 6153)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-10-05 13:33:26 UTC (rev 6154)
@@ -3917,6 +3917,9 @@
assert_almost_equal(rv[2, :],[1,1,-1,-1], 6)
def test():
+ """
+ Run some tests.
+ """
import unittest
suite = unittest.makeSuite(TestRotateVector,'test')
runner = unittest.TextTestRunner()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-05 13:32:44
|
Revision: 6153
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6153&view=rev
Author: jswhit
Date: 2008-10-05 13:31:43 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
docstring updates
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-10-05 13:26:07 UTC (rev 6152)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-10-05 13:31:43 UTC (rev 6153)
@@ -174,7 +174,7 @@
(because either they are computed internally, or entire globe is
always plotted).
- For the cylindrical projections (``cyl``, ``merc`` and ``mill``),
+ For the cylindrical projections (``cyl``, ``merc``,``mill`` and ``gall``),
the default is to use
llcrnrlon=-180,llcrnrlat=-90, urcrnrlon=180 and urcrnrlat=90). For all other
projections except ``ortho`` and ``geos``, either the lat/lon values of the
@@ -350,8 +350,9 @@
For non-cylindrical projections, the inverse transformation
always returns longitudes between -180 and 180 degrees. For
- cylindrical projections (self.projection == ``cyl``, ``mill`` or ``merc``)
- The inverse transformation will return longitudes between
+ cylindrical projections (self.projection == ``cyl``, ``mill``,
+ ``gall`` or ``merc``)
+ the inverse transformation will return longitudes between
self.llcrnrlon and self.llcrnrlat.
Input arguments lon, lat can be either scalar floats, sequences
@@ -797,8 +798,8 @@
For non-cylindrical projections, the inverse transformation
always returns longitudes between -180 and 180 degrees. For
cylindrical projections (self.projection == ``cyl``,
- ``mill`` or ``merc``)
- The inverse transformation will return longitudes between
+ ``mill``,``gall`` or ``merc``)
+ the inverse transformation will return longitudes between
self.llcrnrlon and self.llcrnrlat.
Input arguments lon, lat can be either scalar floats,
@@ -2293,8 +2294,8 @@
lons, lats rank-1 arrays containing longitudes and latitudes
(in degrees) of input data in increasing order.
For non-cylindrical projections (those other than
- ``cyl``, ``merc`` and ``mill``) lons must fit
- within range -180 to 180.
+ ``cyl``, ``merc``,``gall`` and ``mill``) lons must
+ fit within range -180 to 180.
nx, ny The size of the output regular grid in map
projection coordinates
============== ====================================================
@@ -2364,8 +2365,8 @@
lons, lats rank-1 arrays containing longitudes and latitudes
(in degrees) of input data in increasing order.
For non-cylindrical projections (those other than
- ``cyl``, ``merc`` and ``mill``) lons must fit
- within range -180 to 180.
+ ``cyl``, ``merc``,``gall`` and ``mill``) lons must
+ fit within range -180 to 180.
nx, ny The size of the output regular grid in map
projection coordinates
============== ====================================================
@@ -2436,8 +2437,8 @@
lons, lats Arrays containing longitudes and latitudes
(in degrees) of input data in increasing order.
For non-cylindrical projections (those other than
- ``cyl``, ``merc`` and ``mill``) lons must fit
- within range -180 to 180.
+ ``cyl``, ``merc``,``gall`` and ``mill``) lons must
+ fit within range -180 to 180.
============== ====================================================
Returns ``uout, vout`` (rotated vector field).
@@ -3231,15 +3232,15 @@
tmp[:,:,k] = self._bm_rgba
self._bm_rgba = tmp
if cylproj and not bmproj:
- # stack grids side-by-side (in longitiudinal direction), so
- # any range of longitudes may be plotted on a world map.
+ # stack grids side-by-side (in longitiudinal direction), so
+ # any range of longitudes may be plotted on a world map.
self._bm_lons = \
np.concatenate((self._bm_lons,self._bm_lons+360),1)
self._bm_rgba = \
np.concatenate((self._bm_rgba,self._bm_rgba),1)
# convert to normalized floats.
self._bm_rgba = self._bm_rgba.astype(np.float32)/255.
- if not bmproj:
+ if not bmproj: # interpolation necessary.
if newfile or not hasattr(self,'_bm_rgba_warped'):
# transform to nx x ny regularly spaced native
# projection grid.
@@ -3298,6 +3299,7 @@
# plot warped rgba image.
im = self.imshow(self._bm_rgba_warped,ax=ax)
else:
+ # bmproj True, no interpolation necessary.
im = self.imshow(self._bm_rgba,ax=ax)
return im
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-05 13:27:09
|
Revision: 6152
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6152&view=rev
Author: jswhit
Date: 2008-10-05 13:26:07 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
update version number
Modified Paths:
--------------
trunk/toolkits/basemap/doc/conf.py
Modified: trunk/toolkits/basemap/doc/conf.py
===================================================================
--- trunk/toolkits/basemap/doc/conf.py 2008-10-05 13:23:42 UTC (rev 6151)
+++ trunk/toolkits/basemap/doc/conf.py 2008-10-05 13:26:07 UTC (rev 6152)
@@ -46,9 +46,9 @@
# other places throughout the built documents.
#
# The short X.Y version.
-version = '0.99.1'
+version = '0.99.2'
# The full version, including alpha/beta/rc tags.
-release = '0.99.1'
+release = '0.99.2'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-05 13:26:24
|
Revision: 6151
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6151&view=rev
Author: jswhit
Date: 2008-10-05 13:23:42 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
update rsync instructions
Modified Paths:
--------------
trunk/toolkits/basemap/doc/README.txt
Modified: trunk/toolkits/basemap/doc/README.txt
===================================================================
--- trunk/toolkits/basemap/doc/README.txt 2008-10-05 10:14:42 UTC (rev 6150)
+++ trunk/toolkits/basemap/doc/README.txt 2008-10-05 13:23:42 UTC (rev 6151)
@@ -15,4 +15,4 @@
* to update on sf site:
cd build
- rsync -avz html js...@ma...:/home/groups/m/ma/matplotlib/htdocs/basemap/doc/ -essh
+ rsync -avz html jswhit,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/basemap/doc/ -essh
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-10-05 11:28:06
|
Revision: 6150
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6150&view=rev
Author: jouni
Date: 2008-10-05 10:14:42 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
Merged revisions 6149 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
r6149 | jouni | 2008-10-05 13:02:16 +0300 (Sun, 05 Oct 2008) | 2 lines
Fix problem with AFM files that don't specify the font's full name or family name
........
Modified Paths:
--------------
trunk/matplotlib/API_CHANGES
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/afm.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6073
+ /branches/v0_91_maint:1-6073,6149
Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES 2008-10-05 10:02:16 UTC (rev 6149)
+++ trunk/matplotlib/API_CHANGES 2008-10-05 10:14:42 UTC (rev 6150)
@@ -1,6 +1,10 @@
Changes for 0.98.x
==================
+
+* AFM.get_fullname() and get_familyname() no longer raise an
+ exception if the AFM file does not specify these optional attributes,
+ but returns a guess based on the required FontName attribute.
* Changed precision kwarg in spy; default is 0, and the string value
'present' is used for sparse arrays only to show filled locations.
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-10-05 10:02:16 UTC (rev 6149)
+++ trunk/matplotlib/CHANGELOG 2008-10-05 10:14:42 UTC (rev 6150)
@@ -1,3 +1,6 @@
+2008-10-05 Fix problem with AFM files that don't specify the font's
+ full name or family name. - JKS
+
2008-10-04 Added 'scilimits' kwarg to Axes.ticklabel_format() method,
for easy access to the set_powerlimits method of the
major ScalarFormatter. - EF
Modified: trunk/matplotlib/lib/matplotlib/afm.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/afm.py 2008-10-05 10:02:16 UTC (rev 6149)
+++ trunk/matplotlib/lib/matplotlib/afm.py 2008-10-05 10:14:42 UTC (rev 6150)
@@ -34,7 +34,7 @@
John D. Hunter <jd...@gm...>
"""
-import sys, os
+import sys, os, re
from _mathtext_data import uni2type1
#Convert string the a python type
@@ -433,12 +433,22 @@
def get_fullname(self):
"Return the font full name, eg, 'Times-Roman'"
- return self._header['FullName']
+ name = self._header.get('FullName')
+ if name is None: # use FontName as a substitute
+ name = self._header['FontName']
+ return name
def get_familyname(self):
"Return the font family name, eg, 'Times'"
- return self._header['FamilyName']
+ name = self._header.get('FamilyName')
+ if name is not None:
+ return name
+ # FamilyName not specified so we'll make a guess
+ name = self.get_fullname()
+ extras = r'(?i)([ -](regular|plain|italic|oblique|bold|semibold|light|ultralight|extra|condensed))+$'
+ return re.sub(extras, '', name)
+
def get_weight(self):
"Return the font weight, eg, 'Bold' or 'Roman'"
return self._header['Weight']
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-10-05 10:24:45
|
Revision: 6149
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6149&view=rev
Author: jouni
Date: 2008-10-05 10:02:16 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
Fix problem with AFM files that don't specify the font's full name or family name
Modified Paths:
--------------
branches/v0_91_maint/API_CHANGES
branches/v0_91_maint/CHANGELOG
branches/v0_91_maint/lib/matplotlib/afm.py
Modified: branches/v0_91_maint/API_CHANGES
===================================================================
--- branches/v0_91_maint/API_CHANGES 2008-10-05 04:32:52 UTC (rev 6148)
+++ branches/v0_91_maint/API_CHANGES 2008-10-05 10:02:16 UTC (rev 6149)
@@ -1,3 +1,8 @@
+ AFM.get_fullname() and get_familyname() no longer raise an
+ exception if the AFM file does not specify these optional
+ attributes, but returns a guess based on the required FontName
+ attribute.
+
Deprecated all mlab2 functions in mlab
matplotlib.image.imread now no longer always returns RGBA -- if
Modified: branches/v0_91_maint/CHANGELOG
===================================================================
--- branches/v0_91_maint/CHANGELOG 2008-10-05 04:32:52 UTC (rev 6148)
+++ branches/v0_91_maint/CHANGELOG 2008-10-05 10:02:16 UTC (rev 6149)
@@ -1,3 +1,6 @@
+2008-10-05 Fix problem with AFM files that don't specify the font's
+ full name or family name. - JKS
+
2008-09-11 Fix use of backticks in PS - MGD
2008-09-07 Changed full arrows slightly to avoid an xpdf rendering
Modified: branches/v0_91_maint/lib/matplotlib/afm.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/afm.py 2008-10-05 04:32:52 UTC (rev 6148)
+++ branches/v0_91_maint/lib/matplotlib/afm.py 2008-10-05 10:02:16 UTC (rev 6149)
@@ -34,7 +34,7 @@
John D. Hunter <jdh...@ac...>
"""
-import sys, os
+import sys, os, re
from _mathtext_data import uni2type1
#Convert string the a python type
@@ -433,12 +433,22 @@
def get_fullname(self):
"Return the font full name, eg, Times-Roman"
- return self._header['FullName']
+ name = self._header.get('FullName')
+ if name is None: # use FontName as a substitute
+ name = self._header['FontName']
+ return name
def get_familyname(self):
"Return the font family name, eg, Times"
- return self._header['FamilyName']
+ name = self._header.get('FamilyName')
+ if name is not None:
+ return name
+ # FamilyName not specified so we'll make a guess
+ name = self.get_fullname()
+ extras = r'(?i)([ -](regular|plain|italic|oblique|bold|semibold|light|ultralight|extra|condensed))+$'
+ return re.sub(extras, '', name)
+
def get_weight(self):
"Return the font weight, eg, 'Bold' or 'Roman'"
return self._header['Weight']
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-10-05 04:33:01
|
Revision: 6148
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6148&view=rev
Author: efiring
Date: 2008-10-05 04:32:52 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
Add scilimits kwarg to Axes.ticklabel_format() method
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-10-05 01:38:31 UTC (rev 6147)
+++ trunk/matplotlib/CHANGELOG 2008-10-05 04:32:52 UTC (rev 6148)
@@ -1,3 +1,7 @@
+2008-10-04 Added 'scilimits' kwarg to Axes.ticklabel_format() method,
+ for easy access to the set_powerlimits method of the
+ major ScalarFormatter. - EF
+
2008-10-04 Experimental new kwarg borderpad to replace pad in legend,
based on suggestion by Jae-Joon Lee. - EF
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-05 01:38:31 UTC (rev 6147)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-05 04:32:52 UTC (rev 6148)
@@ -1639,26 +1639,34 @@
Optional keyword arguments:
- ======= =====================================
- Keyword Description
- ======= =====================================
- *style* [ 'sci' (or 'scientific') | 'plain' ]
- plain turns off scientific notation
- *axis* [ 'x' | 'y' | 'both' ]
- ======= =====================================
+ ============ =====================================
+ Keyword Description
+ ============ =====================================
+ *style* [ 'sci' (or 'scientific') | 'plain' ]
+ plain turns off scientific notation
+ *scilimits* (m, n), pair of integers; if *style*
+ is 'sci', scientific notation will
+ be used for numbers outside the range
+ 10`-m`:sup: to 10`n`:sup:.
+ Use (0,0) to include all numbers.
+ *axis* [ 'x' | 'y' | 'both' ]
+ ============ =====================================
Only the major ticks are affected.
If the method is called when the
:class:`~matplotlib.ticker.ScalarFormatter` is not the
:class:`~matplotlib.ticker.Formatter` being used, an
- :exc:`AttributeError` will be raised with no additional error
- message.
+ :exc:`AttributeError` will be raised.
- Additional capabilities and/or friendlier error checking may
- be added.
-
"""
style = kwargs.pop('style', '').lower()
+ scilimits = kwargs.pop('scilimits', None)
+ if scilimits is not None:
+ try:
+ m, n = scilimits
+ m+n+1 # check that both are numbers
+ except (ValueError, TypeError):
+ raise ValueError("scilimits must be a sequence of 2 integers")
axis = kwargs.pop('axis', 'both').lower()
if style[:3] == 'sci':
sb = True
@@ -1673,11 +1681,20 @@
sb = None
else:
raise ValueError, "%s is not a valid style value"
- if sb is not None:
- if axis == 'both' or axis == 'x':
- self.xaxis.major.formatter.set_scientific(sb)
- if axis == 'both' or axis == 'y':
- self.yaxis.major.formatter.set_scientific(sb)
+ try:
+ if sb is not None:
+ if axis == 'both' or axis == 'x':
+ self.xaxis.major.formatter.set_scientific(sb)
+ if axis == 'both' or axis == 'y':
+ self.yaxis.major.formatter.set_scientific(sb)
+ if scilimits is not None:
+ if axis == 'both' or axis == 'x':
+ self.xaxis.major.formatter.set_powerlimits(scilimits)
+ if axis == 'both' or axis == 'y':
+ self.yaxis.major.formatter.set_powerlimits(scilimits)
+ except AttributeError:
+ raise AttributeError(
+ "This method only works with the ScalarFormatter.")
def set_axis_off(self):
"""turn off the axis"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-10-05 01:38:42
|
Revision: 6147
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6147&view=rev
Author: efiring
Date: 2008-10-05 01:38:31 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
New legend kwarg: borderpad to replace pad (primary code by Jae-Joon Lee)
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/legend.py
trunk/matplotlib/lib/matplotlib/rcsetup.py
trunk/matplotlib/matplotlibrc.template
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-10-04 13:09:52 UTC (rev 6146)
+++ trunk/matplotlib/CHANGELOG 2008-10-05 01:38:31 UTC (rev 6147)
@@ -1,3 +1,6 @@
+2008-10-04 Experimental new kwarg borderpad to replace pad in legend,
+ based on suggestion by Jae-Joon Lee. - EF
+
2008-09-27 Allow spy to ignore zero values in sparse arrays, based
on patch by Tony Yu. Also fixed plot to handle empty
data arrays, and fixed handling of markers in figlegend. - EF
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py 2008-10-04 13:09:52 UTC (rev 6146)
+++ trunk/matplotlib/lib/matplotlib/legend.py 2008-10-05 01:38:31 UTC (rev 6147)
@@ -85,6 +85,7 @@
numpoints = None, # the number of points in the legend line
prop = None,
pad = None, # the fractional whitespace inside the legend border
+ borderpad = None,
markerscale = None, # the relative size of legend markers vs. original
# the following dimensions are in axes coords
labelsep = None, # the vertical space between the legend entries
@@ -116,12 +117,15 @@
Artist.__init__(self)
- proplist=[numpoints, pad, markerscale, labelsep, handlelen, handletextsep, axespad, shadow]
- propnames=['numpoints', 'pad', 'markerscale', 'labelsep', 'handlelen', 'handletextsep', 'axespad', 'shadow']
+ proplist=[numpoints, pad, borderpad, markerscale, labelsep, handlelen, handletextsep, axespad, shadow]
+ propnames=['numpoints', 'pad', 'borderpad', 'markerscale', 'labelsep', 'handlelen', 'handletextsep', 'axespad', 'shadow']
for name, value in safezip(propnames,proplist):
if value is None:
value=rcParams["legend."+name]
setattr(self,name,value)
+ if pad:
+ warnings.DeprecationWarning("Use 'borderpad' instead of 'pad'.")
+ # 2008/10/04
if self.numpoints <= 0:
raise ValueError("numpoints must be >= 0; it was %d"% numpoints)
if prop is None:
@@ -532,8 +536,14 @@
# Set the data for the legend patch
bbox = self._get_handle_text_bbox(renderer)
- bbox = bbox.expanded(1 + self.pad, 1 + self.pad)
+ if self.pad:
+ bbox = bbox.expanded(1 + self.pad, 1 + self.pad)
+ else:
+ bbox = bbox.transformed(self.get_transform())
+ bbox = bbox.padded(self.borderpad*self.fontsize)
+ bbox = bbox.inverse_transformed(self.get_transform())
l, b, w, h = bbox.bounds
+
self.legendPatch.set_bounds(l, b, w, h)
ox, oy = 0, 0 # center
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-10-04 13:09:52 UTC (rev 6146)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-10-05 01:38:31 UTC (rev 6147)
@@ -416,7 +416,8 @@
'legend.isaxes' : [True,validate_bool], # this option is internally ignored - it never served any useful purpose
'legend.numpoints' : [2, validate_int], # the number of points in the legend line
'legend.fontsize' : ['large', validate_fontsize],
- 'legend.pad' : [0.2, validate_float], # the fractional whitespace inside the legend border
+ 'legend.pad' : [0, validate_float], # was 0.2, deprecated; the fractional whitespace inside the legend border
+ 'legend.borderpad' : [0.5, validate_float], # units are fontsize
'legend.markerscale' : [1.0, validate_float], # the relative size of legend markers vs. original
# the following dimensions are in axes coords
Modified: trunk/matplotlib/matplotlibrc.template
===================================================================
--- trunk/matplotlib/matplotlibrc.template 2008-10-04 13:09:52 UTC (rev 6146)
+++ trunk/matplotlib/matplotlibrc.template 2008-10-05 01:38:31 UTC (rev 6147)
@@ -233,7 +233,8 @@
#legend.isaxes : True
#legend.numpoints : 2 # the number of points in the legend line
#legend.fontsize : large
-#legend.pad : 0.2 # the fractional whitespace inside the legend border
+#legend.pad : 0.0 # deprecated; the fractional whitespace inside the legend border
+#legend.borderpad : 0.5 # border whitspace in fontsize units
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
# the following dimensions are in axes coords
#legend.labelsep : 0.010 # the vertical space between the legend entries
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-10-04 13:10:02
|
Revision: 6146
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6146&view=rev
Author: jswhit
Date: 2008-10-04 13:09:52 +0000 (Sat, 04 Oct 2008)
Log Message:
-----------
add new projections
Modified Paths:
--------------
trunk/toolkits/basemap/doc/users/figures/robin.py
trunk/toolkits/basemap/doc/users/mapsetup.rst
Added Paths:
-----------
trunk/toolkits/basemap/doc/users/figures/gall.py
trunk/toolkits/basemap/doc/users/figures/mbtfpq.py
trunk/toolkits/basemap/doc/users/figures/vandg.py
trunk/toolkits/basemap/doc/users/gall.rst
trunk/toolkits/basemap/doc/users/mbtfpq.rst
trunk/toolkits/basemap/doc/users/vandg.rst
Added: trunk/toolkits/basemap/doc/users/figures/gall.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/gall.py (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/gall.py 2008-10-04 13:09:52 UTC (rev 6146)
@@ -0,0 +1,17 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# llcrnrlat,llcrnrlon,urcrnrlat,urcrnrlon
+# are the lat/lon values of the lower left and upper right corners
+# of the map.
+# resolution = 'c' means use crude resolution coastlines.
+m = Basemap(projection='gall',llcrnrlat=-90,urcrnrlat=90,\
+ llcrnrlon=-180,urcrnrlon=180,resolution='c')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-90.,91.,30.))
+m.drawmeridians(np.arange(-180.,181.,60.))
+m.drawmapboundary(fill_color='aqua')
+plt.title("Gall Stereographic Projection")
+plt.savefig('gall.png')
Added: trunk/toolkits/basemap/doc/users/figures/mbtfpq.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/mbtfpq.py (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/mbtfpq.py 2008-10-04 13:09:52 UTC (rev 6146)
@@ -0,0 +1,14 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# lon_0 is central longitude of projection.
+# resolution = 'c' means use crude resolution coastlines.
+m = Basemap(projection='mbtfpq',lon_0=0,resolution='c')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-90.,120.,30.))
+m.drawmeridians(np.arange(0.,360.,60.))
+m.drawmapboundary(fill_color='aqua')
+plt.title("McBryde-Thomas Flat Polar Quartic Projection")
+plt.savefig('mbtfpq.png')
Modified: trunk/toolkits/basemap/doc/users/figures/robin.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/robin.py 2008-10-04 07:16:10 UTC (rev 6145)
+++ trunk/toolkits/basemap/doc/users/figures/robin.py 2008-10-04 13:09:52 UTC (rev 6146)
@@ -8,7 +8,7 @@
m.fillcontinents(color='coral',lake_color='aqua')
# draw parallels and meridians.
m.drawparallels(np.arange(-90.,120.,30.))
-m.drawmeridians(np.arange(0.,420.,60.))
+m.drawmeridians(np.arange(0.,360.,60.))
m.drawmapboundary(fill_color='aqua')
plt.title("Robinson Projection")
plt.savefig('robin.png')
Added: trunk/toolkits/basemap/doc/users/figures/vandg.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/vandg.py (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/vandg.py 2008-10-04 13:09:52 UTC (rev 6146)
@@ -0,0 +1,14 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# lon_0 is central longitude of projection.
+# resolution = 'c' means use crude resolution coastlines.
+m = Basemap(projection='vandg',lon_0=0,resolution='c')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(0.,360.,60.))
+m.drawmapboundary(fill_color='aqua')
+plt.title("van der Grinten Projection")
+plt.savefig('vandg.png')
Added: trunk/toolkits/basemap/doc/users/gall.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/gall.rst (rev 0)
+++ trunk/toolkits/basemap/doc/users/gall.rst 2008-10-04 13:09:52 UTC (rev 6146)
@@ -0,0 +1,11 @@
+.. _gall:
+
+Gall Stereographic Projection
+=============================
+
+A stereographic, cylindrical projection that is neither equal-area
+or conformal.
+
+.. literalinclude:: figures/gall.py
+
+.. image:: figures/gall.png
Modified: trunk/toolkits/basemap/doc/users/mapsetup.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/mapsetup.rst 2008-10-04 07:16:10 UTC (rev 6145)
+++ trunk/toolkits/basemap/doc/users/mapsetup.rst 2008-10-04 13:09:52 UTC (rev 6146)
@@ -6,7 +6,7 @@
In order to represent the curved surface of the earth on a two-dimensional
map, a map projection is needed. Since this cannot be done without
distortion, there are many map projections, each with it's own advantages
-and disadvantages. Basemap provides 19 different map projections.
+and disadvantages. Basemap provides 22 different map projections.
Some are global, some can only represent a portion of the globe. When
a :class:`~mpl_toolkits.basemap.Basemap` class instance is
created, the desired map projection must
@@ -47,6 +47,7 @@
omerc.rst
poly.rst
mill.rst
+ gall.rst
lcc.rst
laea.rst
stere.rst
@@ -55,3 +56,5 @@
pstere.rst
plaea.rst
paeqd.rst
+ mbtfpq.rst
+ vandg.rst
Added: trunk/toolkits/basemap/doc/users/mbtfpq.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/mbtfpq.rst (rev 0)
+++ trunk/toolkits/basemap/doc/users/mbtfpq.rst 2008-10-04 13:09:52 UTC (rev 6146)
@@ -0,0 +1,10 @@
+.. _mbtfpq:
+
+McBryde-Thomas Flat Polar Quartic
+=================================
+
+A global equal-area projection.
+
+.. literalinclude:: figures/mbtfpq.py
+
+.. image:: figures/mbtfpq.png
Added: trunk/toolkits/basemap/doc/users/vandg.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/vandg.rst (rev 0)
+++ trunk/toolkits/basemap/doc/users/vandg.rst 2008-10-04 13:09:52 UTC (rev 6146)
@@ -0,0 +1,12 @@
+.. _vandg:
+
+van der Grinten Projection
+==========================
+
+A global projection once used by the National Geographic Society for world maps.
+Neither equal area or conformal, shows the world in a circle centered on
+the equator.
+
+.. literalinclude:: figures/vandg.py
+
+.. image:: figures/vandg.png
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-10-04 08:22:04
|
Revision: 6145
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6145&view=rev
Author: efiring
Date: 2008-10-04 07:16:10 +0000 (Sat, 04 Oct 2008)
Log Message:
-----------
Change default precision kwarg in spy from None to 0.
Modified Paths:
--------------
trunk/matplotlib/API_CHANGES
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES 2008-10-02 15:00:54 UTC (rev 6144)
+++ trunk/matplotlib/API_CHANGES 2008-10-04 07:16:10 UTC (rev 6145)
@@ -2,6 +2,11 @@
Changes for 0.98.x
==================
+* Changed precision kwarg in spy; default is 0, and the string value
+ 'present' is used for sparse arrays only to show filled locations.
+
+* EllipseCollection added.
+
* Added angles kwarg to quiver for more flexible specification of
the arrow angles.
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-02 15:00:54 UTC (rev 6144)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-04 07:16:10 UTC (rev 6145)
@@ -6648,21 +6648,21 @@
return Pxx, freqs, bins, im
- def spy(self, Z, precision=None, marker=None, markersize=None,
+ def spy(self, Z, precision=0, marker=None, markersize=None,
aspect='equal', **kwargs):
"""
call signature::
- spy(Z, precision=None, marker=None, markersize=None,
+ spy(Z, precision=0, marker=None, markersize=None,
aspect='equal', **kwargs)
``spy(Z)`` plots the sparsity pattern of the 2-D array *Z*.
- If *precision* is *None*, any non-zero value will be plotted;
+ If *precision* is 0, any non-zero value will be plotted;
else, values of :math:`|Z| > precision` will be plotted.
For :class:`scipy.sparse.spmatrix` instances, there is a
- special case: if *precision* is 0, any value present in
+ special case: if *precision* is 'present', any value present in
the array will be plotted, even if it is identically zero.
The array will be plotted as it would be printed, with
@@ -6715,12 +6715,15 @@
* ',' pixel
"""
+ if precision is None:
+ precision = 0
+ warnings.DeprecationWarning("Use precision=0 instead of None")
+ # 2008/10/03
if marker is None and markersize is None and hasattr(Z, 'tocoo'):
marker = 's'
if marker is None and markersize is None:
Z = np.asarray(Z)
- if precision is None: mask = Z!=0.
- else: mask = np.absolute(Z)>precision
+ mask = np.absolute(Z)>precision
if 'cmap' not in kwargs:
kwargs['cmap'] = mcolors.ListedColormap(['w', 'k'], name='binary')
@@ -6731,22 +6734,16 @@
else:
if hasattr(Z, 'tocoo'):
c = Z.tocoo()
- if precision == 0:
+ if precision == 'present':
y = c.row
x = c.col
else:
- if precision is None:
- nonzero = c.data != 0.
- else:
- nonzero = np.absolute(c.data) > precision
+ nonzero = np.absolute(c.data) > precision
y = c.row[nonzero]
x = c.col[nonzero]
else:
Z = np.asarray(Z)
- if precision is None:
- nonzero = Z!=0.
- else:
- nonzero = np.absolute(Z)>precision
+ nonzero = np.absolute(Z)>precision
y, x = np.nonzero(nonzero)
if marker is None: marker = 's'
if markersize is None: markersize = 10
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-02 15:01:10
|
Revision: 6144
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6144&view=rev
Author: mdboom
Date: 2008-10-02 15:00:54 +0000 (Thu, 02 Oct 2008)
Log Message:
-----------
Fix Blackboard Italics with STIX fonts.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/_mathtext_data.py
Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/_mathtext_data.py 2008-10-02 14:28:45 UTC (rev 6143)
+++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py 2008-10-02 15:00:54 UTC (rev 6144)
@@ -2347,7 +2347,7 @@
'it':
[
(0x0030, 0x0039, 'rm', 0x1d7d8), # 0-9
- (0x0041, 0x0041, 'it', 0xe154), # A-B
+ (0x0041, 0x0042, 'it', 0xe154), # A-B
(0x0043, 0x0043, 'it', 0x2102), # C (missing in beta STIX fonts)
(0x0044, 0x0044, 'it', 0x2145), # D
(0x0045, 0x0047, 'it', 0xe156), # E-G
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-02 14:28:53
|
Revision: 6143
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6143&view=rev
Author: mdboom
Date: 2008-10-02 14:28:45 +0000 (Thu, 02 Oct 2008)
Log Message:
-----------
Fix some python2.6 -3 warnings. (mainly usage of has_key)
Modified Paths:
--------------
trunk/matplotlib/boilerplate.py
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/_pylab_helpers.py
trunk/matplotlib/lib/matplotlib/afm.py
trunk/matplotlib/lib/matplotlib/artist.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
trunk/matplotlib/lib/matplotlib/backends/backend_qt.py
trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
trunk/matplotlib/lib/matplotlib/collections.py
trunk/matplotlib/lib/matplotlib/config/cutils.py
trunk/matplotlib/lib/matplotlib/config/mplconfig.py
trunk/matplotlib/lib/matplotlib/config/rcparams.py
trunk/matplotlib/lib/matplotlib/figure.py
trunk/matplotlib/lib/matplotlib/font_manager.py
trunk/matplotlib/lib/matplotlib/image.py
trunk/matplotlib/lib/matplotlib/legend.py
trunk/matplotlib/lib/matplotlib/lines.py
trunk/matplotlib/lib/matplotlib/mathtext.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/scale.py
trunk/matplotlib/lib/matplotlib/table.py
trunk/matplotlib/lib/matplotlib/text.py
trunk/matplotlib/lib/matplotlib/ticker.py
trunk/matplotlib/lib/pytz/tzinfo.py
trunk/matplotlib/setupext.py
trunk/matplotlib/src/_tkagg.cpp
Modified: trunk/matplotlib/boilerplate.py
===================================================================
--- trunk/matplotlib/boilerplate.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/boilerplate.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -114,7 +114,7 @@
for func in _plotcommands:
- if cmappable.has_key(func):
+ if func in cmappable:
mappable = cmappable[func]
else:
mappable = ''
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -443,7 +443,7 @@
def _get_data_path():
'get the path to matplotlib data'
- if os.environ.has_key('MATPLOTLIBDATA'):
+ if 'MATPLOTLIBDATA' in os.environ:
path = os.environ['MATPLOTLIBDATA']
if not os.path.isdir(path):
raise RuntimeError('Path in environment MATPLOTLIBDATA not a directory')
@@ -535,7 +535,7 @@
fname = os.path.join( os.getcwd(), 'matplotlibrc')
if os.path.exists(fname): return fname
- if os.environ.has_key('MATPLOTLIBRC'):
+ if 'MATPLOTLIBRC' in os.environ:
path = os.environ['MATPLOTLIBRC']
if os.path.exists(path):
fname = os.path.join(path, 'matplotlibrc')
@@ -637,7 +637,7 @@
verbose.set_fileo(ret['verbose.fileo'])
for key, (val, line, cnt) in rc_temp.iteritems():
- if defaultParams.has_key(key):
+ if key in defaultParams:
if fail_on_error:
ret[key] = val # try to convert to proper type or raise
else:
@@ -745,7 +745,7 @@
for k,v in kwargs.items():
name = aliases.get(k) or k
key = '%s.%s' % (g, name)
- if not rcParams.has_key(key):
+ if key not in rcParams:
raise KeyError('Unrecognized key "%s" for group "%s" and name "%s"' %
(key, g, name))
Modified: trunk/matplotlib/lib/matplotlib/_pylab_helpers.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/_pylab_helpers.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/_pylab_helpers.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -31,7 +31,7 @@
destroy = staticmethod(destroy)
def has_fignum(num):
- return Gcf.figs.has_key(num)
+ return num in Gcf.figs
has_fignum = staticmethod(has_fignum)
def get_all_fig_managers():
Modified: trunk/matplotlib/lib/matplotlib/afm.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/afm.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/afm.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -263,7 +263,7 @@
if len(line)==0: continue
key = line.split()[0]
- if optional.has_key(key): d[key] = optional[key](fh)
+ if key in optional: d[key] = optional[key](fh)
l = ( d['StartKernData'], d['StartComposites'] )
return l
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/artist.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -662,7 +662,7 @@
alias, return 'markerfacecolor or mfc' and for the transform
property, which does not, return 'transform'
"""
- if self.aliasd.has_key(s):
+ if s in self.aliasd:
return '%s or %s' % (s, self.aliasd[s])
else: return s
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -73,17 +73,17 @@
chars = [c for c in fmt]
for c in chars:
- if mlines.lineStyles.has_key(c):
+ if c in mlines.lineStyles:
if linestyle is not None:
raise ValueError(
'Illegal format string "%s"; two linestyle symbols' % fmt)
linestyle = c
- elif mlines.lineMarkers.has_key(c):
+ elif c in mlines.lineMarkers:
if marker is not None:
raise ValueError(
'Illegal format string "%s"; two marker symbols' % fmt)
marker = c
- elif mcolors.colorConverter.colors.has_key(c):
+ elif c in mcolors.colorConverter.colors:
if color is not None:
raise ValueError(
'Illegal format string "%s"; two color symbols' % fmt)
@@ -2632,7 +2632,7 @@
#if t.get_clip_on(): t.set_clip_box(self.bbox)
- if kwargs.has_key('clip_on'): t.set_clip_box(self.bbox)
+ if 'clip_on' in kwargs: t.set_clip_box(self.bbox)
return t
text.__doc__ = cbook.dedent(text.__doc__) % martist.kwdocd
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -234,7 +234,7 @@
return False # finish event propagation?
def _get_key(self, event):
- if self.keyvald.has_key(event.keyval):
+ if event.keyval in self.keyvald:
key = self.keyvald[event.keyval]
elif event.keyval <256:
key = chr(event.keyval)
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -170,7 +170,7 @@
def _get_key( self, event ):
if event.key() < 256:
key = event.text().latin1()
- elif self.keyvald.has_key( event.key() ):
+ elif event.key() in self.keyvald.has_key:
key = self.keyvald[ event.key() ]
else:
key = None
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -174,7 +174,7 @@
def _get_key( self, event ):
if event.key() < 256:
key = str(event.text())
- elif self.keyvald.has_key( event.key() ):
+ elif event.key() in self.keyvald:
key = self.keyvald[ event.key() ]
else:
key = None
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -297,7 +297,7 @@
def _get_key(self, event):
val = event.keysym_num
- if self.keyvald.has_key(val):
+ if val in self.keyvald:
key = self.keyvald[val]
elif val<256:
key = chr(val)
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -1141,7 +1141,7 @@
def _get_key(self, evt):
keyval = evt.m_keyCode
- if self.keyvald.has_key(keyval):
+ if keyval in self.keyvald:
key = self.keyvald[keyval]
elif keyval <256:
key = chr(keyval)
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -267,9 +267,9 @@
try:
dashd = backend_bases.GraphicsContextBase.dashd
if cbook.is_string_like(ls):
- if dashd.has_key(ls):
+ if ls in dashd:
dashes = [dashd[ls]]
- elif cbook.ls_mapper.has_key(ls):
+ elif ls in cbook.ls_mapper:
dashes = [dashd[cbook.ls_mapper[ls]]]
else:
raise ValueError()
@@ -278,9 +278,9 @@
dashes = []
for x in ls:
if cbook.is_string_like(x):
- if dashd.has_key(x):
+ if x in dashd:
dashes.append(dashd[x])
- elif cbook.ls_mapper.has_key(x):
+ elif x in cbook.ls_mapper:
dashes.append(dashd[cbook.ls_mapper[x]])
else:
raise ValueError()
Modified: trunk/matplotlib/lib/matplotlib/config/cutils.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/cutils.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/config/cutils.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -93,7 +93,7 @@
def _get_data_path():
'get the path to matplotlib data'
- if os.environ.has_key('MATPLOTLIBDATA'):
+ if 'MATPLOTLIBDATA' in os.environ:
path = os.environ['MATPLOTLIBDATA']
if not os.path.isdir(path):
raise RuntimeError('Path in environment MATPLOTLIBDATA not a directory')
@@ -167,7 +167,7 @@
fname = os.path.join( os.getcwd(), filename)
if os.path.exists(fname): return fname
- if os.environ.has_key('MATPLOTLIBRC'):
+ if 'MATPLOTLIBRC' in os.environ:
path = os.environ['MATPLOTLIBRC']
if os.path.exists(path):
fname = os.path.join(path, filename)
Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -461,8 +461,8 @@
def keys(self):
return self.tconfig_map.keys()
- def has_key(self, val):
- return self.tconfig_map.has_key(val)
+ def __contains__(self, val):
+ return val in self.tconfig_map
def update(self, arg, **kwargs):
try:
Modified: trunk/matplotlib/lib/matplotlib/config/rcparams.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/rcparams.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/config/rcparams.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -19,16 +19,16 @@
class RcParams(dict):
-
+
"""A dictionary object including validation
-
+
validating functions are defined and associated with rc parameters in
rcsetup.py
"""
-
+
validate = dict([ (key, converter) for key, (default, converter) in \
defaultParams.iteritems() ])
-
+
def __setitem__(self, key, val):
try:
if key in _deprecated_map.keys():
@@ -89,7 +89,7 @@
verbose.set_fileo(ret['verbose.fileo'])
for key, (val, line, cnt) in rc_temp.iteritems():
- if defaultParams.has_key(key):
+ if key in defaultParams:
if fail_on_error:
ret[key] = val # try to convert to proper type or raise
else:
@@ -109,7 +109,7 @@
ret['datapath'] = get_data_path()
verbose.report('loaded rc file %s'%fname)
-
+
return ret
@@ -183,7 +183,7 @@
for k,v in kwargs.items():
name = aliases.get(k) or k
key = '%s.%s' % (g, name)
- if not rcParams.has_key(key):
+ if key not in rcParams:
raise KeyError('Unrecognized key "%s" for group "%s" and name "%s"' %
(key, g, name))
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/figure.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -591,7 +591,7 @@
key = self._make_key(*args, **kwargs)
- if self._seen.has_key(key):
+ if key in self._seen:
ax = self._seen[key]
self.sca(ax)
return ax
@@ -652,7 +652,7 @@
"""
key = self._make_key(*args, **kwargs)
- if self._seen.has_key(key):
+ if key in self._seen:
ax = self._seen[key]
self.sca(ax)
return ax
@@ -951,7 +951,7 @@
"""
for key in ('dpi', 'facecolor', 'edgecolor'):
- if not kwargs.has_key(key):
+ if key not in kwargs:
kwargs[key] = rcParams['savefig.%s'%key]
transparent = kwargs.pop('transparent', False)
Modified: trunk/matplotlib/lib/matplotlib/font_manager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/font_manager.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/font_manager.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -505,7 +505,7 @@
for fpath in fontfiles:
verbose.report('createFontDict: %s' % (fpath), 'debug')
fname = os.path.split(fpath)[1]
- if seen.has_key(fname): continue
+ if fname in seen: continue
else: seen[fname] = 1
if fontext == 'afm':
try:
@@ -552,33 +552,33 @@
for j in range(100, 1000, 100):
font[j] = temp[wgt]
- if temp.has_key(400):
+ if 400 in temp:
for j in range(100, 1000, 100):
font[j] = temp[400]
- if temp.has_key(500):
- if temp.has_key(400):
+ if 500 in temp:
+ if 400 in temp:
for j in range(500, 1000, 100):
font[j] = temp[500]
else:
for j in range(100, 1000, 100):
font[j] = temp[500]
- if temp.has_key(300):
+ if 300 in temp:
for j in [100, 200, 300]:
font[j] = temp[300]
- if temp.has_key(200):
- if temp.has_key(300):
+ if 200 in temp:
+ if 300 in temp:
for j in [100, 200]:
font[j] = temp[200]
else:
for j in [100, 200, 300]:
font[j] = temp[200]
- if temp.has_key(800):
+ if 800 in temp:
for j in [600, 700, 800, 900]:
font[j] = temp[800]
- if temp.has_key(700):
- if temp.has_key(800):
+ if 700 in temp:
+ if 800 in temp:
for j in [600, 700]:
font[j] = temp[700]
else:
@@ -872,7 +872,7 @@
# Create list of font paths
for pathname in ['TTFPATH', 'AFMPATH']:
- if os.environ.has_key(pathname):
+ if pathname in os.environ:
ttfpath = os.environ[pathname]
if ttfpath.find(';') >= 0: #win32 style
paths.extend(ttfpath.split(';'))
@@ -983,50 +983,50 @@
fname = None
font = fontdict
- if font.has_key(name):
+ if name in font:
font = font[name]
else:
verbose.report('\tfindfont failed %(name)s'%locals(), 'debug')
return None
- if font.has_key(style):
+ if style in font:
font = font[style]
- elif style == 'italic' and font.has_key('oblique'):
+ elif style == 'italic' and 'oblique' in font:
font = font['oblique']
- elif style == 'oblique' and font.has_key('italic'):
+ elif style == 'oblique' and 'italic' in font:
font = font['italic']
else:
verbose.report('\tfindfont failed %(name)s, %(style)s'%locals(), 'debug')
return None
- if font.has_key(variant):
+ if variant in font:
font = font[variant]
else:
verbose.report('\tfindfont failed %(name)s, %(style)s, %(variant)s'%locals(), 'debug')
return None
- if not font.has_key(weight):
+ if weight in font:
setWeights(font)
- if not font.has_key(weight):
+ if weight not in font:
return None
font = font[weight]
- if font.has_key(stretch):
+ if stretch in font:
stretch_font = font[stretch]
- if stretch_font.has_key('scalable'):
+ if 'scalable' in stretch_font:
fname = stretch_font['scalable']
- elif stretch_font.has_key(size):
+ elif size in stretch_font:
fname = stretch_font[size]
if fname is None:
for val in font.values():
- if val.has_key('scalable'):
+ if 'scalable' in val:
fname = val['scalable']
break
if fname is None:
for val in font.values():
- if val.has_key(size):
+ if size in val:
fname = val[size]
break
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/image.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -334,7 +334,7 @@
"""
if s is None: s = rcParams['image.interpolation']
s = s.lower()
- if not self._interpd.has_key(s):
+ if s not in self._interpd:
raise ValueError('Illegal interpolation string')
self._interpolation = s
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/legend.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -148,7 +148,7 @@
if not self.isaxes and loc in [0,'best']:
loc = 'upper right'
if is_string_like(loc):
- if not self.codes.has_key(loc):
+ if loc not in self.codes:
if self.isaxes:
warnings.warn('Unrecognized location "%s". Falling back on "best"; '
'valid locations are\n\t%s\n'
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -603,7 +603,7 @@
linestyle = '-'
if linestyle not in self._lineStyles:
- if ls_mapper.has_key(linestyle):
+ if linestyle in ls_mapper:
linestyle = ls_mapper[linestyle]
else:
verbose.report('Unrecognized line style %s, %s' %
Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -711,7 +711,7 @@
def _get_glyph(self, fontname, font_class, sym, fontsize):
symbol_name = None
- if fontname in self.fontmap and latex_to_bakoma.has_key(sym):
+ if fontname in self.fontmap and sym in latex_to_bakoma:
basename, num = latex_to_bakoma[sym]
slanted = (basename == "cmmi10") or sym in self._slanted_symbols
try:
@@ -1064,7 +1064,7 @@
found_symbol = False
- if latex_to_standard.has_key(sym):
+ if sym in latex_to_standard:
fontname, num = latex_to_standard[sym]
glyph = chr(num)
found_symbol = True
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -1004,7 +1004,7 @@
%(Patch)s
"""
- if kwargs.has_key('resolution'):
+ if 'resolution' in kwargs:
import warnings
warnings.warn('Circle is now scale free. Use CirclePolygon instead!', DeprecationWarning)
kwargs.pop('resolution')
Modified: trunk/matplotlib/lib/matplotlib/scale.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/scale.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/scale.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -330,7 +330,7 @@
if scale is None:
scale = 'linear'
- if not _scale_mapping.has_key(scale):
+ if scale not in _scale_mapping:
raise ValueError("Unknown scale type '%s'" % scale)
return _scale_mapping[scale](axis, **kwargs)
Modified: trunk/matplotlib/lib/matplotlib/table.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/table.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/table.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -181,7 +181,7 @@
Artist.__init__(self)
- if is_string_like(loc) and not self.codes.has_key(loc):
+ if is_string_like(loc) and loc not in self.codes:
warnings.warn('Unrecognized location %s. Falling back on bottom; valid locations are\n%s\t' %(loc, '\n\t'.join(self.codes.keys())))
loc = 'bottom'
if is_string_like(loc): loc = self.codes.get(loc, 1)
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/text.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -222,7 +222,7 @@
def _get_layout(self, renderer):
key = self.get_prop_tup()
- if self.cached.has_key(key): return self.cached[key]
+ if key in self.cached: return self.cached[key]
horizLayout = []
@@ -337,7 +337,7 @@
# rectprops and the bbox will be drawn using bbox_artist
# function. This is to keep the backward compatibility.
- if rectprops is not None and rectprops.has_key("boxstyle"):
+ if rectprops is not None and "boxstyle" in rectprops:
props = rectprops.copy()
boxstyle = props.pop("boxstyle")
bbox_transmuter = props.pop("bbox_transmuter", None)
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -745,7 +745,7 @@
if vmax<vmin:
vmin, vmax = vmax, vmin
- if self.presets.has_key((vmin, vmax)):
+ if (vmin, vmax) in self.presets:
return self.presets[(vmin, vmax)]
if self.numticks is None:
Modified: trunk/matplotlib/lib/pytz/tzinfo.py
===================================================================
--- trunk/matplotlib/lib/pytz/tzinfo.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/lib/pytz/tzinfo.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -136,7 +136,7 @@
self._utcoffset, self._dst, self._tzname = self._transition_info[0]
_tzinfos[self._transition_info[0]] = self
for inf in self._transition_info[1:]:
- if not _tzinfos.has_key(inf):
+ if inf not in _tzinfos:
_tzinfos[inf] = self.__class__(inf, _tzinfos)
def fromutc(self, dt):
Modified: trunk/matplotlib/setupext.py
===================================================================
--- trunk/matplotlib/setupext.py 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/setupext.py 2008-10-02 14:28:45 UTC (rev 6143)
@@ -70,14 +70,6 @@
import ConfigParser
import cStringIO
-major, minor1, minor2, s, tmp = sys.version_info
-if major<2 or (major==2 and minor1<3):
- True = 1
- False = 0
-else:
- True = True
- False = False
-
BUILT_PNG = False
BUILT_AGG = False
BUILT_FT2FONT = False
@@ -88,9 +80,9 @@
BUILT_WXAGG = False
BUILT_WINDOWING = False
BUILT_CONTOUR = False
-BUILT_DELAUNAY = False
+BUILT_DELAUNAY = False
BUILT_NXUTILS = False
-BUILT_TRAITS = False
+BUILT_TRAITS = False
BUILT_CONTOUR = False
BUILT_GDK = False
BUILT_PATH = False
@@ -696,7 +688,7 @@
add_base_flags(module)
- if not os.environ.has_key('PKG_CONFIG_PATH'):
+ if 'PKG_CONFIG_PATH' not in os.environ:
# If Gtk+ is installed, pkg-config is required to be installed
os.environ['PKG_CONFIG_PATH'] = 'C:\GTK\lib\pkgconfig'
Modified: trunk/matplotlib/src/_tkagg.cpp
===================================================================
--- trunk/matplotlib/src/_tkagg.cpp 2008-10-02 13:38:50 UTC (rev 6142)
+++ trunk/matplotlib/src/_tkagg.cpp 2008-10-02 14:28:45 UTC (rev 6143)
@@ -54,7 +54,7 @@
agg::int8u *destbuffer;
double l,b,r,t;
int destx, desty, destwidth, destheight, deststride;
- unsigned long tmp_ptr;
+ //unsigned long tmp_ptr;
long mode;
long nval;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-02 13:57:03
|
Revision: 6142
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6142&view=rev
Author: mdboom
Date: 2008-10-02 13:38:50 +0000 (Thu, 02 Oct 2008)
Log Message:
-----------
Fix all Python 2.6 deprecation warnings.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py
trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
trunk/matplotlib/lib/matplotlib/backends/backend_qt.py
trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
trunk/matplotlib/lib/matplotlib/delaunay/triangulate.py
trunk/matplotlib/lib/matplotlib/font_manager.py
trunk/matplotlib/lib/matplotlib/mathtext.py
trunk/matplotlib/lib/matplotlib/mlab.py
trunk/matplotlib/lib/matplotlib/transforms.py
trunk/matplotlib/lib/pytz/tzinfo.py
trunk/matplotlib/setupext.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -93,7 +93,7 @@
__revision__ = '$Revision$'
__date__ = '$Date$'
-import md5, os, re, shutil, sys, warnings
+import os, re, shutil, sys, warnings
import distutils.sysconfig
@@ -234,7 +234,7 @@
if always is True, the report will occur on every function
call; otherwise only on the first time the function is called
"""
- assert(callable, func)
+ assert callable(func)
def wrapper(*args, **kwargs):
ret = func(*args, **kwargs)
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -25,7 +25,11 @@
def _fn_name(): return sys._getframe(1).f_code.co_name
-import cairo
+try:
+ import cairo
+except ImportError:
+ raise ImportError("Cairo backend requires that pycairo is installed.")
+
_version_required = (1,2,0)
if cairo.version_info < _version_required:
raise ImportError ("Pycairo %d.%d.%d is installed\n"
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -3,9 +3,13 @@
import os, sys
def fn_name(): return sys._getframe(1).f_code.co_name
-import gobject
-import gtk; gdk = gtk.gdk
-import pango
+try:
+ import gobject
+ import gtk; gdk = gtk.gdk
+ import pango
+except ImportError:
+ raise ImportError("Gtk* backend requires pygtk to be installed.")
+
pygtk_version_required = (2,2,0)
if gtk.pygtk_version < pygtk_version_required:
raise ImportError ("PyGTK %d.%d.%d is installed\n"
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -17,7 +17,10 @@
from cStringIO import StringIO
from datetime import datetime
from math import ceil, cos, floor, pi, sin
-from sets import Set
+try:
+ set
+except NameError:
+ from sets import Set as set
import matplotlib
from matplotlib import __version__, rcParams, get_data_path
@@ -692,7 +695,7 @@
cmap = font.get_charmap()
glyph_ids = []
differences = []
- multi_byte_chars = Set()
+ multi_byte_chars = set()
for c in characters:
ccode = c
gind = cmap.get(ccode) or 0
@@ -1215,14 +1218,14 @@
fname = font.fname
realpath, stat_key = get_realpath_and_stat(fname)
used_characters = self.used_characters.setdefault(
- stat_key, (realpath, Set()))
+ stat_key, (realpath, set()))
used_characters[1].update([ord(x) for x in s])
def merge_used_characters(self, other):
- for stat_key, (realpath, set) in other.items():
+ for stat_key, (realpath, charset) in other.items():
used_characters = self.used_characters.setdefault(
- stat_key, (realpath, Set()))
- used_characters[1].update(set)
+ stat_key, (realpath, set()))
+ used_characters[1].update(charset)
def draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None):
#print >>sys.stderr, "draw_image called"
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -36,7 +36,10 @@
import numpy as npy
import binascii
import re
-from sets import Set
+try:
+ set
+except NameError:
+ from sets import Set as set
if sys.platform.startswith('win'): cmd_split = '&'
else: cmd_split = ';'
@@ -173,14 +176,14 @@
each font."""
realpath, stat_key = get_realpath_and_stat(font.fname)
used_characters = self.used_characters.setdefault(
- stat_key, (realpath, Set()))
+ stat_key, (realpath, set()))
used_characters[1].update([ord(x) for x in s])
def merge_used_characters(self, other):
- for stat_key, (realpath, set) in other.items():
+ for stat_key, (realpath, charset) in other.items():
used_characters = self.used_characters.setdefault(
- stat_key, (realpath, Set()))
- used_characters[1].update(set)
+ stat_key, (realpath, set()))
+ used_characters[1].update(charset)
def set_color(self, r, g, b, store=1):
if (r,g,b) != self.color:
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -13,7 +13,10 @@
from matplotlib.mathtext import MathTextParser
from matplotlib.widgets import SubplotTool
-import qt
+try:
+ import qt
+except ImportError:
+ raise ImportError("Qt backend requires pyqt to be installed.")
backend_version = "0.9.1"
def fn_name(): return sys._getframe(1).f_code.co_name
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -13,7 +13,10 @@
from matplotlib.mathtext import MathTextParser
from matplotlib.widgets import SubplotTool
-from PyQt4 import QtCore, QtGui, Qt
+try:
+ from PyQt4 import QtCore, QtGui, Qt
+except ImportError:
+ raise ImportError("Qt4 backend requires that PyQt4 is installed.")
backend_version = "0.9.1"
def fn_name(): return sys._getframe(1).f_code.co_name
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -112,8 +112,7 @@
import wx
backend_version = wx.VERSION_STRING
except:
- print >>sys.stderr, "Matplotlib backend_wx requires wxPython be installed"
- sys.exit()
+ raise ImportError("Matplotlib backend_wx requires wxPython be installed")
#!!! this is the call that is causing the exception swallowing !!!
#wx.InitAllImageHandlers()
Modified: trunk/matplotlib/lib/matplotlib/delaunay/triangulate.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/delaunay/triangulate.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/delaunay/triangulate.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -1,10 +1,8 @@
import warnings
-# 2.3 compatibility
try:
set
except NameError:
- import sets
- set = sets.Set
+ from sets import Set as set
import numpy as np
@@ -98,7 +96,7 @@
# Find the indices of the unique entries
j_sorted = np.lexsort(keys=(self.x, self.y))
mask_unique = np.hstack([
- True,
+ True,
(np.diff(self.x[j_sorted]) != 0) | (np.diff(self.y[j_sorted]) != 0),
])
return j_sorted[mask_unique]
Modified: trunk/matplotlib/lib/matplotlib/font_manager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/font_manager.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/font_manager.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -34,7 +34,10 @@
"""
import os, sys, glob
-from sets import Set
+try:
+ set
+except NameError:
+ from sets import Set as set
import matplotlib
from matplotlib import afm
from matplotlib import ft2font
@@ -1036,7 +1039,7 @@
verbose.report('findfont returning %s'%fname, 'debug')
return fname
- font_family_aliases = Set(['serif', 'sans-serif', 'cursive',
+ font_family_aliases = set(['serif', 'sans-serif', 'cursive',
'fantasy', 'monospace', 'sans'])
for name in prop.get_family():
Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -175,7 +175,10 @@
import os
from cStringIO import StringIO
from math import ceil
-from sets import Set
+try:
+ set
+except NameError:
+ from sets import Set as set
import unicodedata
from warnings import warn
@@ -531,7 +534,7 @@
info = self._get_info(facename, font_class, sym, fontsize, dpi)
realpath, stat_key = get_realpath_and_stat(info.font.fname)
used_characters = self.used_characters.setdefault(
- stat_key, (realpath, Set()))
+ stat_key, (realpath, set()))
used_characters[1].add(info.num)
self.mathtext_backend.render_glyph(ox, oy, info)
@@ -704,7 +707,7 @@
self.fontmap[val] = fullpath
- _slanted_symbols = Set(r"\int \oint".split())
+ _slanted_symbols = set(r"\int \oint".split())
def _get_glyph(self, fontname, font_class, sym, fontsize):
symbol_name = None
@@ -816,7 +819,7 @@
font = findfont(prop)
self.fontmap['ex'] = font
- _slanted_symbols = Set(r"\int \oint".split())
+ _slanted_symbols = set(r"\int \oint".split())
def _map_virtual_font(self, fontname, font_class, uniindex):
return fontname, uniindex
@@ -1967,7 +1970,7 @@
return empty
class Parser(object):
- _binary_operators = Set(r'''
+ _binary_operators = set(r'''
+ *
\pm \sqcap \rhd
\mp \sqcup \unlhd
@@ -1982,7 +1985,7 @@
\cup \triangleright \ddagger
\uplus \lhd \amalg'''.split())
- _relation_symbols = Set(r'''
+ _relation_symbols = set(r'''
= < > :
\leq \geq \equiv \models
\prec \succ \sim \perp
@@ -1995,7 +1998,7 @@
\in \ni \propto
\vdash \dashv'''.split())
- _arrow_symbols = Set(r'''
+ _arrow_symbols = set(r'''
\leftarrow \longleftarrow \uparrow
\Leftarrow \Longleftarrow \Uparrow
\rightarrow \longrightarrow \downarrow
@@ -2010,32 +2013,32 @@
_spaced_symbols = _binary_operators | _relation_symbols | _arrow_symbols
- _punctuation_symbols = Set(r', ; . ! \ldotp \cdotp'.split())
+ _punctuation_symbols = set(r', ; . ! \ldotp \cdotp'.split())
- _overunder_symbols = Set(r'''
+ _overunder_symbols = set(r'''
\sum \prod \coprod \bigcap \bigcup \bigsqcup \bigvee
\bigwedge \bigodot \bigotimes \bigoplus \biguplus
'''.split())
- _overunder_functions = Set(
+ _overunder_functions = set(
r"lim liminf limsup sup max min".split())
- _dropsub_symbols = Set(r'''\int \oint'''.split())
+ _dropsub_symbols = set(r'''\int \oint'''.split())
- _fontnames = Set("rm cal it tt sf bf default bb frak circled scr".split())
+ _fontnames = set("rm cal it tt sf bf default bb frak circled scr".split())
- _function_names = Set("""
+ _function_names = set("""
arccos csc ker min arcsin deg lg Pr arctan det lim sec arg dim
liminf sin cos exp limsup sinh cosh gcd ln sup cot hom log tan
coth inf max tanh""".split())
- _ambiDelim = Set(r"""
+ _ambiDelim = set(r"""
| \| / \backslash \uparrow \downarrow \updownarrow \Uparrow
\Downarrow \Updownarrow .""".split())
- _leftDelim = Set(r"( [ { \lfloor \langle \lceil".split())
+ _leftDelim = set(r"( [ { \lfloor \langle \lceil".split())
- _rightDelim = Set(r") ] } \rfloor \rangle \rceil".split())
+ _rightDelim = set(r") ] } \rfloor \rangle \rceil".split())
def __init__(self):
# All forward declarations are here
@@ -2381,7 +2384,7 @@
r'^' : r'\circumflexaccent'
}
- _wide_accents = Set(r"widehat widetilde".split())
+ _wide_accents = set(r"widehat widetilde".split())
def accent(self, s, loc, toks):
assert(len(toks)==1)
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -96,7 +96,8 @@
# set is a new builtin function in 2.4; delete the following when
# support for 2.3 is dropped.
-try: set
+try:
+ set
except NameError:
from sets import Set as set
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -36,7 +36,10 @@
from weakref import WeakKeyDictionary
import warnings
-import sets
+try:
+ set
+except NameError:
+ from sets import Set as set
import cbook
from path import Path
@@ -161,7 +164,7 @@
fobj: A Python file-like object
"""
- seen = sets.Set()
+ seen = set()
def recurse(root):
if root in seen:
Modified: trunk/matplotlib/lib/pytz/tzinfo.py
===================================================================
--- trunk/matplotlib/lib/pytz/tzinfo.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/lib/pytz/tzinfo.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -2,7 +2,10 @@
from datetime import datetime, timedelta, tzinfo
from bisect import bisect_right
-from sets import Set
+try:
+ set
+except NameError:
+ from sets import Set as set
import pytz
@@ -71,7 +74,7 @@
def fromutc(self, dt):
'''See datetime.tzinfo.fromutc'''
return (dt + self._utcoffset).replace(tzinfo=self)
-
+
def utcoffset(self,dt):
'''See datetime.tzinfo.utcoffset'''
return self._utcoffset
@@ -101,16 +104,16 @@
def __reduce__(self):
# Special pickle to zone remains a singleton and to cope with
- # database changes.
+ # database changes.
return pytz._p, (self.zone,)
class DstTzInfo(BaseTzInfo):
'''A timezone that has a variable offset from UTC
-
+
The offset might change if daylight savings time comes into effect,
- or at a point in history when the region decides to change their
- timezone definition.
+ or at a point in history when the region decides to change their
+ timezone definition.
'''
# Overridden in subclass
@@ -191,13 +194,13 @@
def localize(self, dt, is_dst=False):
'''Convert naive time to local time.
-
+
This method should be used to construct localtimes, rather
than passing a tzinfo argument to a datetime constructor.
is_dst is used to determine the correct timezone in the ambigous
period at the end of daylight savings time.
-
+
>>> from pytz import timezone
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
>>> amdam = timezone('Europe/Amsterdam')
@@ -226,7 +229,7 @@
AmbiguousTimeError: 2004-10-31 02:00:00
is_dst defaults to False
-
+
>>> amdam.localize(dt) == amdam.localize(dt, False)
True
@@ -238,7 +241,7 @@
# but we might end up with two if we are in the end-of-DST
# transition period. Or possibly more in some particularly confused
# location...
- possible_loc_dt = Set()
+ possible_loc_dt = set()
for tzinfo in self._tzinfos.values():
loc_dt = tzinfo.normalize(dt.replace(tzinfo=tzinfo))
if loc_dt.replace(tzinfo=None) == dt:
@@ -281,7 +284,7 @@
)
filtered_possible_loc_dt.sort(mycmp)
return filtered_possible_loc_dt[0]
-
+
def utcoffset(self, dt):
'''See datetime.tzinfo.utcoffset'''
return self._utcoffset
@@ -328,11 +331,11 @@
See DstTzInfo.normalize() for more info
'''
-
+
def unpickler(zone, utcoffset=None, dstoffset=None, tzname=None):
"""Factory function for unpickling pytz tzinfo instances.
-
+
This is shared for both StaticTzInfo and DstTzInfo instances, because
database changes could cause a zones implementation to switch between
these two base classes and we can't break pickles on a pytz version
Modified: trunk/matplotlib/setupext.py
===================================================================
--- trunk/matplotlib/setupext.py 2008-10-01 14:20:28 UTC (rev 6141)
+++ trunk/matplotlib/setupext.py 2008-10-02 13:38:50 UTC (rev 6142)
@@ -43,8 +43,8 @@
import os
import re
+import subprocess
-
basedir = {
'win32' : ['win32_static',],
'linux2' : ['/usr/local', '/usr'],
@@ -64,7 +64,6 @@
import sys, os, stat
if sys.platform != 'win32':
import commands
-from sets import Set
from textwrap import fill
from distutils.core import Extension
import glob
@@ -188,6 +187,14 @@
pass
print_status = print_message = print_raw = print_line
+def run_child_process(cmd):
+ p = subprocess.Popen(cmd, shell=True,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ close_fds=True)
+ return p.stdin, p.stdout
+
class CleanUpFile:
"""CleanUpFile deletes the specified filename when self is destroyed."""
def __init__(self, name):
@@ -499,7 +506,7 @@
def check_for_dvipng():
try:
- stdin, stdout = os.popen4('dvipng -version')
+ stdin, stdout = run_child_process('dvipng -version')
print_status("dvipng", stdout.readlines()[1].split()[-1])
return True
except (IndexError, ValueError):
@@ -512,7 +519,7 @@
command = 'gswin32c --version'
else:
command = 'gs --version'
- stdin, stdout = os.popen4(command)
+ stdin, stdout = run_child_process(command)
print_status("ghostscript", stdout.read()[:-1])
return True
except (IndexError, ValueError):
@@ -521,7 +528,7 @@
def check_for_latex():
try:
- stdin, stdout = os.popen4('latex -version')
+ stdin, stdout = run_child_process('latex -version')
line = stdout.readlines()[0]
pattern = '3\.1\d+'
match = re.search(pattern, line)
@@ -533,7 +540,7 @@
def check_for_pdftops():
try:
- stdin, stdout = os.popen4('pdftops -v')
+ stdin, stdout = run_child_process('pdftops -v')
for line in stdout.readlines():
if 'version' in line:
print_status("pdftops", line.split()[-1])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-01 14:20:47
|
Revision: 6141
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6141&view=rev
Author: mdboom
Date: 2008-10-01 14:20:28 +0000 (Wed, 01 Oct 2008)
Log Message:
-----------
[ 2107138 ] x/yticklabels return value incorrect
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axis.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py 2008-10-01 08:04:02 UTC (rev 6140)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2008-10-01 14:20:28 UTC (rev 6141)
@@ -239,14 +239,12 @@
#t = mtext.Text(
trans, vert, horiz = self.axes.get_xaxis_text1_transform(self._pad)
size = rcParams['xtick.labelsize']
- t = mtext.TextWithDash(
+ t = mtext.Text(
x=0, y=0,
fontproperties=font_manager.FontProperties(size=size),
color=rcParams['xtick.color'],
verticalalignment=vert,
horizontalalignment=horiz,
- dashdirection=0,
- xaxis=True,
)
t.set_transform(trans)
@@ -261,13 +259,11 @@
#t = mtext.Text(
trans, vert, horiz = self.axes.get_xaxis_text2_transform(self._pad)
- t = mtext.TextWithDash(
+ t = mtext.Text(
x=0, y=1,
fontproperties=font_manager.FontProperties(size=rcParams['xtick.labelsize']),
color=rcParams['xtick.color'],
verticalalignment=vert,
- dashdirection=1,
- xaxis=True,
horizontalalignment=horiz,
)
t.set_transform(trans)
@@ -374,14 +370,12 @@
#t = mtext.Text(
trans, vert, horiz = self.axes.get_yaxis_text1_transform(self._pad)
- t = mtext.TextWithDash(
+ t = mtext.Text(
x=0, y=0,
fontproperties=font_manager.FontProperties(size=rcParams['ytick.labelsize']),
color=rcParams['ytick.color'],
verticalalignment=vert,
horizontalalignment=horiz,
- dashdirection=0,
- xaxis=False,
)
t.set_transform(trans)
#t.set_transform( self.axes.transData )
@@ -394,13 +388,11 @@
#t = mtext.Text(
trans, vert, horiz = self.axes.get_yaxis_text2_transform(self._pad)
- t = mtext.TextWithDash(
+ t = mtext.Text(
x=1, y=0,
fontproperties=font_manager.FontProperties(size=rcParams['ytick.labelsize']),
color=rcParams['ytick.color'],
verticalalignment=vert,
- dashdirection=1,
- xaxis=False,
horizontalalignment=horiz,
)
t.set_transform(trans)
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2008-10-01 08:04:02 UTC (rev 6140)
+++ trunk/matplotlib/lib/matplotlib/text.py 2008-10-01 14:20:28 UTC (rev 6141)
@@ -846,7 +846,6 @@
dashrotation=None,
dashpad=3,
dashpush=0,
- xaxis=True,
):
Text.__init__(self, x=x, y=y, text=text, color=color,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|