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: <ef...@us...> - 2009-01-20 03:22:09
|
Revision: 6811
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6811&view=rev
Author: efiring
Date: 2009-01-20 02:03:42 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
Fix bug in quiver argument handling.
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/quiver.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-01-19 18:11:35 UTC (rev 6810)
+++ branches/v0_98_5_maint/CHANGELOG 2009-01-20 02:03:42 UTC (rev 6811)
@@ -1,3 +1,5 @@
+2009-01-19 Fix bug in quiver argument handling. - EF
+
2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF
2009-01-16 Fix bug in is_string_like so it doesn't raise an
Modified: branches/v0_98_5_maint/lib/matplotlib/quiver.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/quiver.py 2009-01-19 18:11:35 UTC (rev 6810)
+++ branches/v0_98_5_maint/lib/matplotlib/quiver.py 2009-01-20 02:03:42 UTC (rev 6811)
@@ -386,14 +386,13 @@
X, Y, U, V, C = [None]*5
args = list(args)
if len(args) == 3 or len(args) == 5:
- C = ma.asarray(args.pop(-1)).ravel()
+ C = ma.asarray(args.pop(-1))
V = ma.asarray(args.pop(-1))
U = ma.asarray(args.pop(-1))
- nn = np.shape(U)
- nc = nn[0]
- nr = 1
- if len(nn) > 1:
- nr = nn[1]
+ if U.ndim == 1:
+ nr, nc = 1, U.shape[0]
+ else:
+ nr, nc = U.shape
if len(args) == 2: # remaining after removing U,V,C
X, Y = [np.array(a).ravel() for a in args]
if len(X) == nc and len(Y) == nr:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-01-20 02:13:01
|
Revision: 6812
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6812&view=rev
Author: efiring
Date: 2009-01-20 02:08:37 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
Merge r6811 from v0_98_5_maint
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/quiver.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6809
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6811
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-20 02:03:42 UTC (rev 6811)
+++ trunk/matplotlib/CHANGELOG 2009-01-20 02:08:37 UTC (rev 6812)
@@ -1,3 +1,5 @@
+2009-01-19 Fix bug in quiver argument handling. - EF
+
2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF
2009-01-16 Implement bbox_inches option for savefig. If bbox_inches is
Modified: trunk/matplotlib/lib/matplotlib/quiver.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/quiver.py 2009-01-20 02:03:42 UTC (rev 6811)
+++ trunk/matplotlib/lib/matplotlib/quiver.py 2009-01-20 02:08:37 UTC (rev 6812)
@@ -386,14 +386,13 @@
X, Y, U, V, C = [None]*5
args = list(args)
if len(args) == 3 or len(args) == 5:
- C = ma.asarray(args.pop(-1)).ravel()
+ C = ma.asarray(args.pop(-1))
V = ma.asarray(args.pop(-1))
U = ma.asarray(args.pop(-1))
- nn = np.shape(U)
- nc = nn[0]
- nr = 1
- if len(nn) > 1:
- nr = nn[1]
+ if U.ndim == 1:
+ nr, nc = 1, U.shape[0]
+ else:
+ nr, nc = U.shape
if len(args) == 2: # remaining after removing U,V,C
X, Y = [np.array(a).ravel() for a in args]
if len(X) == nc and len(Y) == nr:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-01-19 18:11:40
|
Revision: 6810
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6810&view=rev
Author: efiring
Date: 2009-01-19 18:11:35 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
Merged 6809 from v0_98_5_maint
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6805
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6809
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-19 18:06:15 UTC (rev 6809)
+++ trunk/matplotlib/CHANGELOG 2009-01-19 18:11:35 UTC (rev 6810)
@@ -1,3 +1,5 @@
+2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF
+
2009-01-16 Implement bbox_inches option for savefig. If bbox_inches is
"tight", try to determine the tight bounding box. - JJL
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-01-19 18:06:15 UTC (rev 6809)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-01-19 18:11:35 UTC (rev 6810)
@@ -489,7 +489,8 @@
self.vbox.destroy()
self.window.destroy()
self.canvas.destroy()
- self.toolbar.destroy()
+ if self.toolbar:
+ self.toolbar.destroy()
self.__dict__.clear()
if Gcf.get_num_fig_managers()==0 and \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-01-19 18:06:30
|
Revision: 6809
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6809&view=rev
Author: efiring
Date: 2009-01-19 18:06:15 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
Don't try to delete nonexistent toolbar in backend_gtk
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/backends/backend_gtk.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-01-19 16:04:37 UTC (rev 6808)
+++ branches/v0_98_5_maint/CHANGELOG 2009-01-19 18:06:15 UTC (rev 6809)
@@ -1,4 +1,4 @@
-
+2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF
2009-01-16 Fix bug in is_string_like so it doesn't raise an
unnecessary exception. - EF
Modified: branches/v0_98_5_maint/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/backends/backend_gtk.py 2009-01-19 16:04:37 UTC (rev 6808)
+++ branches/v0_98_5_maint/lib/matplotlib/backends/backend_gtk.py 2009-01-19 18:06:15 UTC (rev 6809)
@@ -484,7 +484,8 @@
self.vbox.destroy()
self.window.destroy()
self.canvas.destroy()
- self.toolbar.destroy()
+ if self.toolbar:
+ self.toolbar.destroy()
self.__dict__.clear()
if Gcf.get_num_fig_managers()==0 and \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-01-19 16:04:43
|
Revision: 6808
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6808&view=rev
Author: jswhit
Date: 2009-01-19 16:04:37 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
updated pupynere
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2009-01-19 15:08:56 UTC (rev 6807)
+++ trunk/toolkits/basemap/Changelog 2009-01-19 16:04:37 UTC (rev 6808)
@@ -1,4 +1,5 @@
version 0.99.4 (not yet released)
+ * update pupynere to version 1.0.8 (supports writing large files).
* added more informative error message in readshapefile when
one of the shapefile components can't be found.
version 0.99.3 (svn revision 6780)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-01-19 15:09:03
|
Revision: 6807
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6807&view=rev
Author: jswhit
Date: 2009-01-19 15:08:56 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
update to version 1.0.8
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/pupynere.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/pupynere.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/pupynere.py 2009-01-18 00:12:15 UTC (rev 6806)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/pupynere.py 2009-01-19 15:08:56 UTC (rev 6807)
@@ -77,7 +77,8 @@
from operator import mul
from mmap import mmap, ACCESS_READ
-from numpy import fromstring, ndarray, dtype, empty, array, asarray, squeeze, zeros, ma
+from numpy import fromstring, ndarray, dtype, empty, array, asarray, squeeze,\
+ zeros, ma
from numpy import little_endian as LITTLE_ENDIAN
@@ -127,9 +128,11 @@
attribute of the ``netcdf_file`` object.
"""
- def __init__(self, filename, mode='r', mmap=True, maskandscale=False):
+ def __init__(self, filename, mode='r', mmap=True, version=1,\
+ maskandscale=False):
self.filename = filename
self.use_mmap = mmap
+ self.version_byte = version
self._maskandscale = maskandscale
assert mode in 'rw', "Mode must be either 'r' or 'w'."
@@ -180,7 +183,8 @@
if size > 1: dtype_ += str(size)
data = empty(shape_, dtype=dtype_)
- self.variables[name] = netcdf_variable(data, typecode, shape, dimensions, maskandscale=self._maskandscale)
+ self.variables[name] = netcdf_variable(data, typecode, shape,\
+ dimensions, maskandscale=self._maskandscale)
return self.variables[name]
def flush(self):
@@ -190,10 +194,8 @@
def _write(self):
self.fp.write('CDF')
+ self.fp.write(array(self.version_byte, '>b').tostring())
- self.__dict__['version_byte'] = 1
- self.fp.write(array(1, '>b').tostring())
-
# Write headers and data.
self._write_numrecs()
self._write_dim_array()
@@ -347,7 +349,8 @@
def _read(self):
# Check magic bytes and version
- assert self.fp.read(3) == 'CDF', "Error: %s is not a valid NetCDF 3 file" % self.filename
+ magic = self.fp.read(3)
+ assert magic == 'CDF', "Error: %s is not a valid NetCDF 3 file" % self.filename
self.__dict__['version_byte'] = fromstring(self.fp.read(1), '>b')[0]
# Read file headers and set data.
@@ -360,7 +363,8 @@
self.__dict__['_recs'] = self._unpack_int()
def _read_dim_array(self):
- assert self.fp.read(4) in [ZERO, NC_DIMENSION]
+ header = self.fp.read(4)
+ assert header in [ZERO, NC_DIMENSION]
count = self._unpack_int()
for dim in range(count):
@@ -374,7 +378,8 @@
self.__setattr__(k, v)
def _read_att_array(self):
- assert self.fp.read(4) in [ZERO, NC_ATTRIBUTE]
+ header = self.fp.read(4)
+ assert header in [ZERO, NC_ATTRIBUTE]
count = self._unpack_int()
attributes = {}
@@ -384,7 +389,8 @@
return attributes
def _read_var_array(self):
- assert self.fp.read(4) in [ZERO, NC_VARIABLE]
+ header = self.fp.read(4)
+ assert header in [ZERO, NC_VARIABLE]
begin = 0
dtypes = {'names': [], 'formats': []}
@@ -423,7 +429,8 @@
# Add variable.
self.variables[name] = netcdf_variable(
- data, typecode, shape, dimensions, attributes, maskandscale=self._maskandscale)
+ data, typecode, shape, dimensions, attributes,
+ maskandscale=self._maskandscale)
if rec_vars:
# Remove padding when only one record variable.
@@ -544,7 +551,8 @@
attribute of the ``netcdf_variable`` object.
"""
- def __init__(self, data, typecode, shape, dimensions, attributes=None, maskandscale=False):
+ def __init__(self, data, typecode, shape, dimensions, attributes=None,\
+ maskandscale=False):
self.data = data
self._typecode = typecode
self._shape = shape
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-01-18 00:12:49
|
Revision: 6806
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6806&view=rev
Author: mdboom
Date: 2009-01-18 00:12:15 +0000 (Sun, 18 Jan 2009)
Log Message:
-----------
Merged revisions 6805 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6805 | mdboom | 2009-01-17 19:10:21 -0500 (Sat, 17 Jan 2009) | 1 line
Trivial change to test svnmerge
........
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6802
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6805
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-01-18 00:10:29
|
Revision: 6805
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6805&view=rev
Author: mdboom
Date: 2009-01-18 00:10:21 +0000 (Sun, 18 Jan 2009)
Log Message:
-----------
Trivial change to test svnmerge
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-01-17 10:28:48 UTC (rev 6804)
+++ branches/v0_98_5_maint/CHANGELOG 2009-01-18 00:10:21 UTC (rev 6805)
@@ -1,3 +1,5 @@
+
+
2009-01-16 Fix bug in is_string_like so it doesn't raise an
unnecessary exception. - EF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-01-17 10:28:52
|
Revision: 6804
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6804&view=rev
Author: leejjoon
Date: 2009-01-17 10:28:48 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
bbox_inches option for savefig
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/backend_bases.py
trunk/matplotlib/lib/matplotlib/figure.py
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-17 05:47:42 UTC (rev 6803)
+++ trunk/matplotlib/CHANGELOG 2009-01-17 10:28:48 UTC (rev 6804)
@@ -1,3 +1,6 @@
+2009-01-16 Implement bbox_inches option for savefig. If bbox_inches is
+ "tight", try to determine the tight bounding box. - JJL
+
2009-01-16 Fix bug in is_string_like so it doesn't raise an
unnecessary exception. - EF
Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py 2009-01-17 05:47:42 UTC (rev 6803)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2009-01-17 10:28:48 UTC (rev 6804)
@@ -33,6 +33,9 @@
import matplotlib.path as path
from matplotlib import rcParams
+from matplotlib.transforms import Bbox, TransformedBbox, Affine2D
+import cStringIO
+
class RendererBase:
"""An abstract base class to handle drawing/rendering operations.
@@ -1419,6 +1422,28 @@
self.figure.set_facecolor(facecolor)
self.figure.set_edgecolor(edgecolor)
+ bbox_inches = kwargs.pop("bbox_inches", None)
+
+ if bbox_inches:
+ # call adjust_bbox to save only the given area
+ if bbox_inches == "tight":
+ # save the figure to estimate the bounding box
+ result = getattr(self, method_name)(
+ cStringIO.StringIO(),
+ dpi=dpi,
+ facecolor=facecolor,
+ edgecolor=edgecolor,
+ orientation=orientation,
+ **kwargs)
+ renderer = self.figure._cachedRenderer
+ bbox_inches = self.figure.get_tightbbox(renderer)
+ pad = kwargs.pop("pad_inches", 0.1)
+ bbox_inches = bbox_inches.padded(pad)
+
+ restore_bbox = self._adjust_bbox(self.figure, format,
+ bbox_inches)
+
+
try:
result = getattr(self, method_name)(
filename,
@@ -1428,6 +1453,9 @@
orientation=orientation,
**kwargs)
finally:
+ if bbox_inches and restore_bbox:
+ restore_bbox()
+
self.figure.dpi = origDPI
self.figure.set_facecolor(origfacecolor)
self.figure.set_edgecolor(origedgecolor)
@@ -1435,6 +1463,91 @@
#self.figure.canvas.draw() ## seems superfluous
return result
+
+ def _adjust_bbox(self, fig, format, bbox_inches):
+ """
+ Temporarily adjust the figure so that only the specified area
+ (bbox_inches) is saved.
+
+ It modifies fig.bbox, fig.bbox_inches,
+ fig.transFigure._boxout, and fig.patch. While the figure size
+ changes, the scale of the original figure is conserved. A
+ function whitch restores the original values are returned.
+ """
+
+ origBbox = fig.bbox
+ origBboxInches = fig.bbox_inches
+ _boxout = fig.transFigure._boxout
+
+ def restore_bbox():
+ fig.bbox = origBbox
+ fig.bbox_inches = origBboxInches
+ fig.transFigure._boxout = _boxout
+ fig.transFigure.invalidate()
+ fig.patch.set_bounds(0, 0, 1, 1)
+
+ if format in ["png", "raw", "rgba"]:
+ self._adjust_bbox_png(fig, bbox_inches)
+ return restore_bbox
+ elif format in ["pdf", "eps"]:
+ self._adjust_bbox_pdf(fig, bbox_inches)
+ return restore_bbox
+ else:
+ warnings.warn("bbox_inches option for %s backend is not implemented yet." % (format))
+ return None
+
+
+ def _adjust_bbox_png(self, fig, bbox_inches):
+ """
+ _adjust_bbox for png (Agg) format
+ """
+
+ tr = fig.dpi_scale_trans
+
+ _bbox = TransformedBbox(bbox_inches,
+ tr)
+ x0, y0 = _bbox.x0, _bbox.y0
+ fig.bbox_inches = Bbox.from_bounds(0, 0,
+ bbox_inches.width,
+ bbox_inches.height)
+
+ x0, y0 = _bbox.x0, _bbox.y0
+ w1, h1 = fig.bbox.width, fig.bbox.height
+ self.figure.transFigure._boxout = Bbox.from_bounds(-x0, -y0,
+ w1, h1)
+ self.figure.transFigure.invalidate()
+
+ fig.bbox = TransformedBbox(fig.bbox_inches, tr)
+
+ fig.patch.set_bounds(x0/w1, y0/h1,
+ fig.bbox.width/w1, fig.bbox.height/h1)
+
+
+ def _adjust_bbox_pdf(self, fig, bbox_inches):
+ """
+ _adjust_bbox for pdf & eps format
+ """
+
+ tr = Affine2D().scale(72)
+
+ _bbox = TransformedBbox(bbox_inches, tr)
+
+ fig.bbox_inches = Bbox.from_bounds(0, 0,
+ bbox_inches.width,
+ bbox_inches.height)
+ x0, y0 = _bbox.x0, _bbox.y0
+ f = 72. / fig.dpi
+ w1, h1 = fig.bbox.width*f, fig.bbox.height*f
+ self.figure.transFigure._boxout = Bbox.from_bounds(-x0, -y0,
+ w1, h1)
+ self.figure.transFigure.invalidate()
+
+ fig.bbox = TransformedBbox(fig.bbox_inches, tr)
+
+ fig.patch.set_bounds(x0/w1, y0/h1,
+ fig.bbox.width/w1, fig.bbox.height/h1)
+
+
def get_default_filetype(self):
raise NotImplementedError
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py 2009-01-17 05:47:42 UTC (rev 6803)
+++ trunk/matplotlib/lib/matplotlib/figure.py 2009-01-17 10:28:48 UTC (rev 6804)
@@ -33,6 +33,7 @@
import matplotlib.cbook as cbook
+
class SubplotParams:
"""
A class to hold the parameters for a subplot
@@ -971,6 +972,16 @@
a plot on top of a colored background on a web page. The
transparency of these patches will be restored to their
original values upon exit of this function.
+
+ *bbox_inches*:
+ Bbox in inches. Only the given portion of the figure is
+ saved. If 'tight', try to figure out the tight bbox of
+ the figure.
+
+ *pad_inches*:
+ Amount of padding around the figure when bbox_inches is
+ 'tight'.
+
"""
for key in ('dpi', 'facecolor', 'edgecolor'):
@@ -1091,6 +1102,41 @@
return blocking_input(timeout=timeout)
+
+ def get_tightbbox(self, renderer):
+ """
+ Return a (tight) bounding box of the figure in inches.
+
+ It only accounts axes title, axis labels, and axis
+ ticklabels. Needs improvement.
+ """
+
+ artists = []
+ bb = []
+ for ax in self.axes:
+
+ artists.append(ax.xaxis.label)
+ artists.append(ax.yaxis.label)
+ artists.append(ax.title)
+ artists.append(ax)
+
+ bbx1, bbx2 = ax.xaxis.get_ticklabel_extents(renderer)
+ bby1, bby2 = ax.yaxis.get_ticklabel_extents(renderer)
+ bb.extend([bbx1, bbx2, bby1, bby2])
+
+
+ bb.extend([c.get_window_extent(renderer) for c in artists \
+ if c.get_visible()])
+
+ _bbox = Bbox.union([b for b in bb if b.width!=0 or b.height!=0])
+
+ bbox_inches = TransformedBbox(_bbox,
+ Affine2D().scale(1./self.dpi))
+
+ return bbox_inches
+
+
+
def figaspect(arg):
"""
Create a figure with specified aspect ratio. If *arg* is a number,
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2009-01-17 05:47:42 UTC (rev 6803)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2009-01-17 10:28:48 UTC (rev 6804)
@@ -635,7 +635,7 @@
Return a new :class:`Bbox` that is padded on all four sides by
the given value.
"""
- points = self._points
+ points = self.get_points()
return Bbox(points + [[-p, -p], [p, p]])
def translated(self, tx, ty):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-01-17 05:47:45
|
Revision: 6803
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6803&view=rev
Author: efiring
Date: 2009-01-17 05:47:42 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
Merge 6802 from 98.5 maintenance
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/cbook.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6800
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6802
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-17 04:22:07 UTC (rev 6802)
+++ trunk/matplotlib/CHANGELOG 2009-01-17 05:47:42 UTC (rev 6803)
@@ -1,3 +1,6 @@
+2009-01-16 Fix bug in is_string_like so it doesn't raise an
+ unnecessary exception. - EF
+
2009-01-16 Fix an infinite recursion in the unit registry when searching
for a converter for a sequence of strings. Add a corresponding
test. - RM
@@ -13,8 +16,6 @@
2009-01-16 Applied Michiel's patch for macosx backend to fix rounding
bug. Closed sf bug 2508440 - JSW
-2009-01-10 Fix bug in pan/zoom with log coordinates. - EF
-
2009-01-10 Applied Michiel's hatch patch for macosx backend and
draw_idle patch for qt. Closes sf patched 2497785 and
2468809 - JDH
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-01-17 04:22:07 UTC (rev 6802)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-01-17 05:47:42 UTC (rev 6803)
@@ -275,7 +275,7 @@
else:
return False
try: obj + ''
- except (TypeError, ValueError): return False
+ except: return False
return True
def is_sequence_of_strings(obj):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-01-17 04:22:10
|
Revision: 6802
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6802&view=rev
Author: efiring
Date: 2009-01-17 04:22:07 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
Make is_string_like work with boost python wrapped sequences
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/cbook.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-01-16 21:24:01 UTC (rev 6801)
+++ branches/v0_98_5_maint/CHANGELOG 2009-01-17 04:22:07 UTC (rev 6802)
@@ -1,4 +1,7 @@
-2009-11-16 Bugfix of C typedef of MPL_Int64 that was failing on
+2009-01-16 Fix bug in is_string_like so it doesn't raise an
+ unnecessary exception. - EF
+
+2009-01-16 Bugfix of C typedef of MPL_Int64 that was failing on
Windows XP 64 bit, as reported by George Goussard on numpy
mailing list. - ADS
Modified: branches/v0_98_5_maint/lib/matplotlib/cbook.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/cbook.py 2009-01-16 21:24:01 UTC (rev 6801)
+++ branches/v0_98_5_maint/lib/matplotlib/cbook.py 2009-01-17 04:22:07 UTC (rev 6802)
@@ -275,7 +275,7 @@
else:
return False
try: obj + ''
- except (TypeError, ValueError): return False
+ except: return False
return True
def is_sequence_of_strings(obj):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-01-16 21:24:14
|
Revision: 6801
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6801&view=rev
Author: jdh2358
Date: 2009-01-16 21:24:01 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Merged revisions 6800 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6800 | jdh2358 | 2009-01-16 13:21:17 -0800 (Fri, 16 Jan 2009) | 1 line
fixed get_interpolation / get_resample for AxesImage
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/image.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6792
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6800
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2009-01-16 21:21:17 UTC (rev 6800)
+++ trunk/matplotlib/lib/matplotlib/image.py 2009-01-16 21:24:01 UTC (rev 6801)
@@ -348,10 +348,16 @@
self._interpolation = s
def set_resample(self, v):
+ """
+ set whether or not image resampling is used
+
+ ACCEPTS: True|False
+ """
if v is None: v = rcParams['image.resample']
self._resample = v
- def get_interpolation(self):
+ def get_resample(self):
+ 'return the image resample boolean'
return self._resample
def get_extent(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-01-16 21:21:26
|
Revision: 6800
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6800&view=rev
Author: jdh2358
Date: 2009-01-16 21:21:17 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
fixed get_interpolation / get_resample for AxesImage
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/image.py
Modified: branches/v0_98_5_maint/lib/matplotlib/image.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/image.py 2009-01-16 20:30:29 UTC (rev 6799)
+++ branches/v0_98_5_maint/lib/matplotlib/image.py 2009-01-16 21:21:17 UTC (rev 6800)
@@ -348,10 +348,16 @@
self._interpolation = s
def set_resample(self, v):
+ """
+ set whether or not image resampling is used
+
+ ACCEPTS: True|False
+ """
if v is None: v = rcParams['image.resample']
self._resample = v
- def get_interpolation(self):
+ def get_resample(self):
+ 'return the image resample boolean'
return self._resample
def get_extent(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ry...@us...> - 2009-01-16 20:30:36
|
Revision: 6799
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6799&view=rev
Author: ryanmay
Date: 2009-01-16 20:30:29 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Use staticmethod as a decorator since we can assume Python 2.4
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/dates.py
trunk/matplotlib/lib/matplotlib/units.py
Modified: trunk/matplotlib/lib/matplotlib/dates.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/dates.py 2009-01-16 20:26:39 UTC (rev 6798)
+++ trunk/matplotlib/lib/matplotlib/dates.py 2009-01-16 20:30:29 UTC (rev 6799)
@@ -1005,6 +1005,7 @@
class DateConverter(units.ConversionInterface):
+ @staticmethod
def axisinfo(unit):
'return the unit AxisInfo'
if unit=='date':
@@ -1016,17 +1017,16 @@
label='',
)
else: return None
- axisinfo = staticmethod(axisinfo)
+ @staticmethod
def convert(value, unit):
if units.ConversionInterface.is_numlike(value): return value
return date2num(value)
- convert = staticmethod(convert)
+ @staticmethod
def default_units(x):
'Return the default unit for *x* or None'
return 'date'
- default_units = staticmethod(default_units)
units.registry[datetime.date] = DateConverter()
Modified: trunk/matplotlib/lib/matplotlib/units.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/units.py 2009-01-16 20:26:39 UTC (rev 6798)
+++ trunk/matplotlib/lib/matplotlib/units.py 2009-01-16 20:30:29 UTC (rev 6799)
@@ -18,11 +18,12 @@
class DateConverter(units.ConversionInterface):
+ @staticmethod
def convert(value, unit):
'convert value to a scalar or array'
return dates.date2num(value)
- convert = staticmethod(convert)
+ @staticmethod
def axisinfo(unit):
'return major and minor tick locators and formatters'
if unit!='date': return None
@@ -31,13 +32,11 @@
return AxisInfo(majloc=majloc,
majfmt=majfmt,
label='date')
- axisinfo = staticmethod(axisinfo)
-
+ @staticmethod
def default_units(x):
'return the default unit for x or None'
return 'date'
- default_units = staticmethod(default_units)
# finally we register our object type with a converter
units.registry[datetime.date] = DateConverter()
@@ -69,16 +68,17 @@
The minimal interface for a converter to take custom instances (or
sequences) and convert them to values mpl can use
"""
+ @staticmethod
def axisinfo(unit):
'return an units.AxisInfo instance for unit'
return None
- axisinfo = staticmethod(axisinfo)
+ @staticmethod
def default_units(x):
'return the default unit for x or None'
return None
- default_units = staticmethod(default_units)
+ @staticmethod
def convert(obj, unit):
"""
convert obj using unit. If obj is a sequence, return the
@@ -86,8 +86,8 @@
that can be used by the numpy array layer
"""
return obj
- convert = staticmethod(convert)
+ @staticmethod
def is_numlike(x):
"""
The matplotlib datalim, autoscaling, locators etc work with
@@ -103,7 +103,6 @@
return is_numlike(thisx)
else:
return is_numlike(x)
- is_numlike = staticmethod(is_numlike)
class Registry(dict):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ry...@us...> - 2009-01-16 20:26:48
|
Revision: 6798
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6798&view=rev
Author: ryanmay
Date: 2009-01-16 20:26:39 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Fix an infinite recursion in the unit registry when trying to find a converter for a sequence of strings. Add a test for this to unit/nose_tests.py
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/units.py
trunk/matplotlib/unit/nose_tests.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-16 20:06:55 UTC (rev 6797)
+++ trunk/matplotlib/CHANGELOG 2009-01-16 20:26:39 UTC (rev 6798)
@@ -1,8 +1,12 @@
-2009-11-16 Bugfix of C typedef of MPL_Int64 that was failing on
+2009-01-16 Fix an infinite recursion in the unit registry when searching
+ for a converter for a sequence of strings. Add a corresponding
+ test. - RM
+
+2009-01-16 Bugfix of C typedef of MPL_Int64 that was failing on
Windows XP 64 bit, as reported by George Goussard on numpy
mailing list. - ADS
-2009-11-16 Added helper function LinearSegmentedColormap.from_list to
+2009-01-16 Added helper function LinearSegmentedColormap.from_list to
facilitate building simple custom colomaps. See
examples/pylab_examples/custom_cmap_fromlist.py - JDH
Modified: trunk/matplotlib/lib/matplotlib/units.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/units.py 2009-01-16 20:06:55 UTC (rev 6797)
+++ trunk/matplotlib/lib/matplotlib/units.py 2009-01-16 20:26:39 UTC (rev 6798)
@@ -44,7 +44,7 @@
"""
import numpy as np
-from matplotlib.cbook import iterable, is_numlike
+from matplotlib.cbook import iterable, is_numlike, is_string_like
class AxisInfo:
'information to support default axis labeling and tick labeling'
@@ -127,7 +127,10 @@
if classx is not None:
converter = self.get(classx)
- if converter is None and iterable(x):
+ # Check explicity for strings here because they would otherwise
+ # lead to an infinite recursion, because a single character will
+ # pass the iterable() check.
+ if converter is None and iterable(x) and not is_string_like(x):
# if this is anything but an object array, we'll assume
# there are no custom units
if isinstance(x, np.ndarray) and x.dtype != np.object:
Modified: trunk/matplotlib/unit/nose_tests.py
===================================================================
--- trunk/matplotlib/unit/nose_tests.py 2009-01-16 20:06:55 UTC (rev 6797)
+++ trunk/matplotlib/unit/nose_tests.py 2009-01-16 20:26:39 UTC (rev 6798)
@@ -40,6 +40,17 @@
fig.canvas.draw()
plt.close(fig)
+def test_units_strings():
+ # Make sure passing in sequences of strings doesn't cause the unit
+ # conversion registry to recurse infinitely
+ Id = ['50', '100', '150', '200', '250']
+ pout = ['0', '7.4', '11.4', '14.2', '16.3']
+ fig = plt.figure()
+ ax = fig.add_subplot(111)
+ ax.plot(Id, pout)
+ fig.canvas.draw()
+ plt.close(fig)
+
if __name__=='__main__':
nose.runmodule(argv=['-s','--with-doctest'], exit=False)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ry...@us...> - 2009-01-16 20:07:01
|
Revision: 6797
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6797&view=rev
Author: ryanmay
Date: 2009-01-16 20:06:55 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Merge evans_test2.py and radian_demo.py, as they are 99% identical (no differences in showing off units support).
Modified Paths:
--------------
trunk/matplotlib/examples/units/radian_demo.py
Removed Paths:
-------------
trunk/matplotlib/examples/units/evans_test2.py
Deleted: trunk/matplotlib/examples/units/evans_test2.py
===================================================================
--- trunk/matplotlib/examples/units/evans_test2.py 2009-01-16 18:56:11 UTC (rev 6796)
+++ trunk/matplotlib/examples/units/evans_test2.py 2009-01-16 20:06:55 UTC (rev 6797)
@@ -1,25 +0,0 @@
-"""
-Plot with radians from the basic_units mockup example package
-This example shows how the unit class can determine the tick locating,
-formatting and axis labeling.
-"""
-import numpy as np
-from basic_units import radians, degrees, cos
-from pylab import figure, show
-from matplotlib.cbook import iterable
-import math
-
-
-x = np.arange(0, 15, 0.01) * radians
-
-
-fig = figure()
-
-ax = fig.add_subplot(211)
-ax.plot(x, cos(x), xunits=radians)
-
-ax = fig.add_subplot(212)
-ax.plot(x, cos(x), xunits=degrees)
-
-show()
-
Modified: trunk/matplotlib/examples/units/radian_demo.py
===================================================================
--- trunk/matplotlib/examples/units/radian_demo.py 2009-01-16 18:56:11 UTC (rev 6796)
+++ trunk/matplotlib/examples/units/radian_demo.py 2009-01-16 20:06:55 UTC (rev 6797)
@@ -1,11 +1,17 @@
+"""
+Plot with radians from the basic_units mockup example package
+This example shows how the unit class can determine the tick locating,
+formatting and axis labeling.
+"""
import numpy as np
from basic_units import radians, degrees, cos
-from pylab import figure, show
+from matplotlib.pyplot import figure, show
x = np.arange(0, 15, 0.01) * radians
fig = figure()
fig.subplots_adjust(hspace=0.3)
+
ax = fig.add_subplot(211)
ax.plot(x, cos(x), xunits=radians)
@@ -13,4 +19,3 @@
ax.plot(x, cos(x), xunits=degrees)
show()
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-01-16 18:56:21
|
Revision: 6796
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6796&view=rev
Author: jdh2358
Date: 2009-01-16 18:56:11 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
cleaned up svn merge from isnan fix
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6781
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6792
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-01-16 18:48:01
|
Revision: 6795
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6795&view=rev
Author: mdboom
Date: 2009-01-16 18:47:51 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Remove need for m_done flag in simlifier -- we can just put a path_stop onto the queue instead. Saves one boolean test on every iteration.
Modified Paths:
--------------
trunk/matplotlib/src/agg_py_path_iterator.h
Modified: trunk/matplotlib/src/agg_py_path_iterator.h
===================================================================
--- trunk/matplotlib/src/agg_py_path_iterator.h 2009-01-16 18:45:39 UTC (rev 6794)
+++ trunk/matplotlib/src/agg_py_path_iterator.h 2009-01-16 18:47:51 UTC (rev 6795)
@@ -143,8 +143,7 @@
m_origdx(0.0), m_origdy(0.0),
m_origdNorm2(0.0), m_dnorm2Max(0.0), m_dnorm2Min(0.0),
m_haveMin(false), m_lastMax(false), m_maxX(0.0), m_maxY(0.0),
- m_minX(0.0), m_minY(0.0), m_lastWrittenX(0.0), m_lastWrittenY(0.0),
- m_done(false)
+ m_minX(0.0), m_minY(0.0), m_lastWrittenX(0.0), m_lastWrittenY(0.0)
#if DEBUG_SIMPLIFY
, m_pushed(0), m_skipped(0)
#endif
@@ -202,17 +201,6 @@
return cmd;
}
- // If the queue is now empty, and the path was fully consumed
- // in the last call to the main loop, return agg::path_cmd_stop to
- // signal that there are no more points to emit.
- if (m_done)
- {
- #if DEBUG_SIMPLIFY
- printf(".\n");
- #endif
- return agg::path_cmd_stop;
- }
-
// The main simplification loop. The point is to consume only as many
// points as necessary until something has been added to the outbound
// queue, not to run through the entire path in one go. This
@@ -418,7 +406,7 @@
}
queue_push(agg::path_cmd_line_to, m_maxX, m_maxY);
}
- m_done = true;
+ queue_push(agg::path_cmd_stop, 0.0, 0.0);
}
// Return the first item in the queue, if any, otherwise
@@ -455,7 +443,7 @@
bool m_simplify;
double m_width, m_height;
- static const int m_queue_size = 7;
+ static const int m_queue_size = 8;
int m_queue_read;
int m_queue_write;
item m_queue[m_queue_size];
@@ -479,7 +467,6 @@
double m_minY;
double m_lastWrittenX;
double m_lastWrittenY;
- bool m_done;
#if DEBUG_SIMPLIFY
unsigned m_pushed;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-01-16 18:45:43
|
Revision: 6794
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6794&view=rev
Author: mdboom
Date: 2009-01-16 18:45:39 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Use miter_join_revert in Agg backend to match behavior of other backends.
Modified Paths:
--------------
trunk/matplotlib/src/_backend_agg.cpp
Modified: trunk/matplotlib/src/_backend_agg.cpp
===================================================================
--- trunk/matplotlib/src/_backend_agg.cpp 2009-01-16 18:45:18 UTC (rev 6793)
+++ trunk/matplotlib/src/_backend_agg.cpp 2009-01-16 18:45:39 UTC (rev 6794)
@@ -209,7 +209,7 @@
std::string joinstyle = Py::String( gc.getAttr("_joinstyle") );
if (joinstyle=="miter")
- join = agg::miter_join;
+ join = agg::miter_join_revert;
else if (joinstyle=="round")
join = agg::round_join;
else if(joinstyle=="bevel")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-01-16 18:45:29
|
Revision: 6793
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6793&view=rev
Author: mdboom
Date: 2009-01-16 18:45:18 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Use "real" decorators, now that we don't support Python 2.3
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py
trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
trunk/matplotlib/lib/matplotlib/collections.py
trunk/matplotlib/lib/matplotlib/path.py
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2009-01-16 18:24:19 UTC (rev 6792)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2009-01-16 18:45:18 UTC (rev 6793)
@@ -121,7 +121,7 @@
ctx.stroke()
- #@staticmethod
+ @staticmethod
def convert_path(ctx, tpath):
for points, code in tpath.iter_segments():
if code == Path.MOVETO:
@@ -136,7 +136,6 @@
ctx.curve_to(*points)
elif code == Path.CLOSEPOLY:
ctx.close_path()
- convert_path = staticmethod(convert_path)
def draw_path(self, gc, path, transform, rgbFace=None):
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-01-16 18:24:19 UTC (rev 6792)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-01-16 18:45:18 UTC (rev 6793)
@@ -349,7 +349,10 @@
if self._need_redraw:
x, y, w, h = self.allocation
self._pixmap_prepare (w, h)
- self._render_figure(self._pixmap, w, h)
+ try:
+ self._render_figure(self._pixmap, w, h)
+ except:
+ pass
self._need_redraw = False
x, y, w, h = event.area
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2009-01-16 18:24:19 UTC (rev 6792)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2009-01-16 18:45:18 UTC (rev 6793)
@@ -303,7 +303,7 @@
gfx_ctx.Clip(new_bounds[0], self.height - new_bounds[1] - new_bounds[3],
new_bounds[2], new_bounds[3])
- #@staticmethod
+ @staticmethod
def convert_path(gfx_ctx, tpath):
wxpath = gfx_ctx.CreatePath()
for points, code in tpath.iter_segments():
@@ -318,7 +318,6 @@
elif code == Path.CLOSEPOLY:
wxpath.CloseSubpath()
return wxpath
- convert_path = staticmethod(convert_path)
def draw_path(self, gc, path, transform, rgbFace=None):
gc.select()
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2009-01-16 18:24:19 UTC (rev 6792)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2009-01-16 18:45:18 UTC (rev 6793)
@@ -565,7 +565,7 @@
self._meshWidth, self._meshHeight, self._coordinates)
return self._paths
- #@staticmethod
+ @staticmethod
def convert_mesh_to_paths(meshWidth, meshHeight, coordinates):
"""
Converts a given mesh into a sequence of
@@ -590,7 +590,6 @@
), axis=2)
points = points.reshape((meshWidth * meshHeight, 5, 2))
return [Path(x) for x in points]
- convert_mesh_to_paths = staticmethod(convert_mesh_to_paths)
def get_datalim(self, transData):
return self._bbox
Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py 2009-01-16 18:24:19 UTC (rev 6792)
+++ trunk/matplotlib/lib/matplotlib/path.py 2009-01-16 18:45:18 UTC (rev 6793)
@@ -117,7 +117,7 @@
self.codes = codes
self.vertices = vertices
- #@classmethod
+ @classmethod
def make_compound_path(cls, *args):
"""
(staticmethod) Make a compound path from a list of Path
@@ -139,7 +139,6 @@
i += length
return cls(vertices, codes)
- make_compound_path = classmethod(make_compound_path)
def __repr__(self):
return "Path(%s, %s)" % (self.vertices, self.codes)
@@ -337,7 +336,7 @@
return convert_path_to_polygons(self, transform, width, height)
_unit_rectangle = None
- #@classmethod
+ @classmethod
def unit_rectangle(cls):
"""
(staticmethod) Returns a :class:`Path` of the unit rectangle
@@ -347,10 +346,10 @@
cls._unit_rectangle = \
cls([[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]])
return cls._unit_rectangle
- unit_rectangle = classmethod(unit_rectangle)
_unit_regular_polygons = WeakValueDictionary()
- #@classmethod
+
+ @classmethod
def unit_regular_polygon(cls, numVertices):
"""
(staticmethod) Returns a :class:`Path` for a unit regular
@@ -371,10 +370,10 @@
path = cls(verts)
cls._unit_regular_polygons[numVertices] = path
return path
- unit_regular_polygon = classmethod(unit_regular_polygon)
_unit_regular_stars = WeakValueDictionary()
- #@classmethod
+
+ @classmethod
def unit_regular_star(cls, numVertices, innerCircle=0.5):
"""
(staticmethod) Returns a :class:`Path` for a unit regular star
@@ -397,9 +396,8 @@
path = cls(verts)
cls._unit_regular_polygons[(numVertices, innerCircle)] = path
return path
- unit_regular_star = classmethod(unit_regular_star)
- #@classmethod
+ @classmethod
def unit_regular_asterisk(cls, numVertices):
"""
(staticmethod) Returns a :class:`Path` for a unit regular
@@ -407,10 +405,10 @@
centered at (0, 0).
"""
return cls.unit_regular_star(numVertices, 0.0)
- unit_regular_asterisk = classmethod(unit_regular_asterisk)
_unit_circle = None
- #@classmethod
+
+ @classmethod
def unit_circle(cls):
"""
(staticmethod) Returns a :class:`Path` of the unit circle.
@@ -470,9 +468,8 @@
cls._unit_circle = cls(vertices, codes)
return cls._unit_circle
- unit_circle = classmethod(unit_circle)
- #@classmethod
+ @classmethod
def arc(cls, theta1, theta2, n=None, is_wedge=False):
"""
(staticmethod) Returns an arc on the unit circle from angle
@@ -549,9 +546,8 @@
vertices[vertex_offset+2:end:3, 1] = yB
return cls(vertices, codes)
- arc = classmethod(arc)
- #@classmethod
+ @classmethod
def wedge(cls, theta1, theta2, n=None):
"""
(staticmethod) Returns a wedge of the unit circle from angle
@@ -562,10 +558,10 @@
determined based on the delta between *theta1* and *theta2*.
"""
return cls.arc(theta1, theta2, n, True)
- wedge = classmethod(wedge)
_hatch_dict = maxdict(8)
- #@classmethod
+
+ @classmethod
def hatch(cls, hatchpattern, density=6):
"""
Given a hatch specifier, *hatchpattern*, generates a Path that
@@ -584,7 +580,6 @@
hatch_path = get_path(hatchpattern, density)
cls._hatch_dict[(hatchpattern, density)] = hatch_path
return hatch_path
- hatch = classmethod(hatch)
_get_path_collection_extents = get_path_collection_extents
def get_path_collection_extents(*args):
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2009-01-16 18:24:19 UTC (rev 6792)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2009-01-16 18:45:18 UTC (rev 6793)
@@ -667,7 +667,7 @@
bbox.update_from_data_xy(corners_rotated, ignore=True)
return bbox
- #@staticmethod
+ @staticmethod
def union(bboxes):
"""
Return a :class:`Bbox` that contains all of the given bboxes.
@@ -692,7 +692,6 @@
y1 = max(y1, np.max(ys))
return Bbox.from_extents(x0, y0, x1, y1)
- union = staticmethod(union)
class Bbox(BboxBase):
@@ -724,16 +723,15 @@
TransformNode.invalidate(self)
_unit_values = np.array([[0.0, 0.0], [1.0, 1.0]], np.float_)
- #@staticmethod
+ @staticmethod
def unit():
"""
(staticmethod) Create a new unit :class:`Bbox` from (0, 0) to
(1, 1).
"""
return Bbox(Bbox._unit_values.copy())
- unit = staticmethod(unit)
- #@staticmethod
+ @staticmethod
def from_bounds(x0, y0, width, height):
"""
(staticmethod) Create a new :class:`Bbox` from *x0*, *y0*,
@@ -742,9 +740,8 @@
*width* and *height* may be negative.
"""
return Bbox.from_extents(x0, y0, x0 + width, y0 + height)
- from_bounds = staticmethod(from_bounds)
- #@staticmethod
+ @staticmethod
def from_extents(*args):
"""
(staticmethod) Create a new Bbox from *left*, *bottom*,
@@ -754,7 +751,6 @@
"""
points = np.array(args, dtype=np.float_).reshape(2, 2)
return Bbox(points)
- from_extents = staticmethod(from_extents)
def __repr__(self):
return 'Bbox(%s)' % repr(self._points)
@@ -1311,14 +1307,13 @@
def __array__(self, *args, **kwargs):
return self.get_matrix()
- #@staticmethod
+ @staticmethod
def _concat(a, b):
"""
Concatenates two transformation matrices (represented as numpy
arrays) together.
"""
return np.dot(b, a)
- _concat = staticmethod(_concat)
def get_matrix(self):
"""
@@ -1387,7 +1382,7 @@
mtx = self.get_matrix()
return tuple(mtx[:2].swapaxes(0, 1).flatten())
- #@staticmethod
+ @staticmethod
def matrix_from_values(a, b, c, d, e, f):
"""
(staticmethod) Create a new transformation matrix as a 3x3
@@ -1398,7 +1393,6 @@
0 0 1
"""
return np.array([[a, c, e], [b, d, f], [0.0, 0.0, 1.0]], np.float_)
- matrix_from_values = staticmethod(matrix_from_values)
def transform(self, points):
mtx = self.get_matrix()
@@ -1473,7 +1467,7 @@
return 0
return -1
- #@staticmethod
+ @staticmethod
def from_values(a, b, c, d, e, f):
"""
(staticmethod) Create a new Affine2D instance from the given
@@ -1486,7 +1480,6 @@
return Affine2D(
np.array([a, c, e, b, d, f, 0.0, 0.0, 1.0], np.float_)
.reshape((3,3)))
- from_values = staticmethod(from_values)
def get_matrix(self):
"""
@@ -1519,7 +1512,7 @@
self._mtx = other.get_matrix()
self.invalidate()
- #@staticmethod
+ @staticmethod
def identity():
"""
(staticmethod) Return a new :class:`Affine2D` object that is
@@ -1529,7 +1522,6 @@
the faster :class:`IdentityTransform` class instead.
"""
return Affine2D(np.identity(3))
- identity = staticmethod(identity)
def clear(self):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-01-16 18:24:23
|
Revision: 6792
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6792&view=rev
Author: astraw
Date: 2009-01-16 18:24:19 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Bugfix of C typedef of MPL_Int64 failing on WinXP64
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/src/MPL_isnan.h
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-01-16 18:16:40 UTC (rev 6791)
+++ branches/v0_98_5_maint/CHANGELOG 2009-01-16 18:24:19 UTC (rev 6792)
@@ -1,3 +1,7 @@
+2009-11-16 Bugfix of C typedef of MPL_Int64 that was failing on
+ Windows XP 64 bit, as reported by George Goussard on numpy
+ mailing list. - ADS
+
2009-01-10 Fix bug in pan/zoom with log coordinates. - EF
2009-01-06 Fix bug in setting of dashed negative contours. - EF
Modified: branches/v0_98_5_maint/src/MPL_isnan.h
===================================================================
--- branches/v0_98_5_maint/src/MPL_isnan.h 2009-01-16 18:16:40 UTC (rev 6791)
+++ branches/v0_98_5_maint/src/MPL_isnan.h 2009-01-16 18:24:19 UTC (rev 6792)
@@ -12,19 +12,6 @@
#include <stdint.h>
#endif
-#if defined(SIZEOF_VOID_P)
-#if SIZEOF_VOID_P == 8
-#define MPL_LP64 1
-#else
-#define MPL_LP64 0
-#endif
-#else
-#define MPL_LP64 0
-#endif
-
-#if MPL_LP64
-typedef long int MPL_Int64;
-#else /* 32-bit platforms */
#if defined(_MSC_VER)
typedef __int64 MPL_Int64;
#else
@@ -34,7 +21,6 @@
typedef long long MPL_Int64;
#endif
#endif
-#endif
#if !defined(MPL_U64)
#define MPL_U64(u) (* (MPL_Int64 *) &(u) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-01-16 18:16:46
|
Revision: 6791
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6791&view=rev
Author: astraw
Date: 2009-01-16 18:16:40 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Bugfix of C typedef of MPL_Int64 failing on WinXP64
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/src/MPL_isnan.h
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-16 17:06:38 UTC (rev 6790)
+++ trunk/matplotlib/CHANGELOG 2009-01-16 18:16:40 UTC (rev 6791)
@@ -1,3 +1,7 @@
+2009-11-16 Bugfix of C typedef of MPL_Int64 that was failing on
+ Windows XP 64 bit, as reported by George Goussard on numpy
+ mailing list. - ADS
+
2009-11-16 Added helper function LinearSegmentedColormap.from_list to
facilitate building simple custom colomaps. See
examples/pylab_examples/custom_cmap_fromlist.py - JDH
Modified: trunk/matplotlib/src/MPL_isnan.h
===================================================================
--- trunk/matplotlib/src/MPL_isnan.h 2009-01-16 17:06:38 UTC (rev 6790)
+++ trunk/matplotlib/src/MPL_isnan.h 2009-01-16 18:16:40 UTC (rev 6791)
@@ -12,19 +12,6 @@
#include <stdint.h>
#endif
-#if defined(SIZEOF_VOID_P)
-#if SIZEOF_VOID_P == 8
-#define MPL_LP64 1
-#else
-#define MPL_LP64 0
-#endif
-#else
-#define MPL_LP64 0
-#endif
-
-#if MPL_LP64
-typedef long int MPL_Int64;
-#else /* 32-bit platforms */
#if defined(_MSC_VER)
typedef __int64 MPL_Int64;
#else
@@ -34,7 +21,6 @@
typedef long long MPL_Int64;
#endif
#endif
-#endif
#if !defined(MPL_U64)
#define MPL_U64(u) (* (MPL_Int64 *) &(u) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-01-16 17:06:41
|
Revision: 6790
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6790&view=rev
Author: jdh2358
Date: 2009-01-16 17:06:38 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
added custom colormap from list func
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/colors.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-16 16:25:28 UTC (rev 6789)
+++ trunk/matplotlib/CHANGELOG 2009-01-16 17:06:38 UTC (rev 6790)
@@ -1,3 +1,7 @@
+2009-11-16 Added helper function LinearSegmentedColormap.from_list to
+ facilitate building simple custom colomaps. See
+ examples/pylab_examples/custom_cmap_fromlist.py - JDH
+
2009-01-16 Applied Michiel's patch for macosx backend to fix rounding
bug. Closed sf bug 2508440 - JSW
Modified: trunk/matplotlib/lib/matplotlib/colors.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colors.py 2009-01-16 16:25:28 UTC (rev 6789)
+++ trunk/matplotlib/lib/matplotlib/colors.py 2009-01-16 17:06:38 UTC (rev 6790)
@@ -611,7 +611,27 @@
self._isinit = True
self._set_extremes()
+ @staticmethod
+ def from_list(name, colors, N=256):
+ """
+ Make a linear segmented colormap with *name* from a sequence
+ of *colors* which evenly transitions from colors[0] at val=1
+ to colors[-1] at val=1. N is the number of rgb quantization
+ levels.
+ """
+ ncolors = len(colors)
+ vals = np.linspace(0., 1., ncolors)
+
+ cdict = dict(red=[], green=[], blue=[])
+ for val, color in zip(vals, colors):
+ r,g,b = colorConverter.to_rgb(color)
+ cdict['red'].append((val, r, r))
+ cdict['green'].append((val, g, g))
+ cdict['blue'].append((val, b, b))
+
+ return LinearSegmentedColormap(name, cdict, N)
+
class ListedColormap(Colormap):
"""Colormap object generated from a list of colors.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-01-16 16:25:36
|
Revision: 6789
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6789&view=rev
Author: jswhit
Date: 2009-01-16 16:25:28 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
upped version number to 0.99.4
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
trunk/toolkits/basemap/setup.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2009-01-16 16:22:16 UTC (rev 6788)
+++ trunk/toolkits/basemap/Changelog 2009-01-16 16:25:28 UTC (rev 6789)
@@ -1,3 +1,6 @@
+version 0.99.4 (not yet released)
+ * added more informative error message in readshapefile when
+ one of the shapefile components can't be found.
version 0.99.3 (svn revision 6780)
* if upper right/lower left corners nor width/height given for
azimuthal equidistant ('aeqd') the whole world is drawn in
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-01-16 16:22:16 UTC (rev 6788)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-01-16 16:25:28 UTC (rev 6789)
@@ -48,7 +48,7 @@
else:
basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
-__version__ = '0.99.3'
+__version__ = '0.99.4'
# supported map projections.
_projnames = {'cyl' : 'Cylindrical Equidistant',
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py 2009-01-16 16:22:16 UTC (rev 6788)
+++ trunk/toolkits/basemap/setup.py 2009-01-16 16:25:28 UTC (rev 6789)
@@ -225,7 +225,7 @@
package_data = {'mpl_toolkits.basemap':pyproj_datafiles+basemap_datafiles}
setup(
name = "basemap",
- version = "0.99.3",
+ version = "0.99.4",
description = "Plot data on map projections with matplotlib",
long_description = """
An add-on toolkit for matplotlib that lets you plot data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-01-16 16:22:19
|
Revision: 6788
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6788&view=rev
Author: jswhit
Date: 2009-01-16 16:22:16 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
added more informative error message when one of shapefile components can't be found.
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 2009-01-16 16:12:27 UTC (rev 6787)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-01-16 16:22:16 UTC (rev 6788)
@@ -1608,6 +1608,12 @@
vertices. If ``drawbounds=True`` a
matplotlib.patches.LineCollection object is appended to the tuple.
"""
+ if not os.path.exists('%s.shp'%shapefile):
+ raise IOError('cannot locate %s.shp'%shapefile)
+ if not os.path.exists('%s.shx'%shapefile):
+ raise IOError('cannot locate %s.shx'%shapefile)
+ if not os.path.exists('%s.dbf'%shapefile):
+ raise IOError('cannot locate %s.dbf'%shapefile)
# open shapefile, read vertices for each object, convert
# to map projection coordinates (only works for 2D shape types).
try:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|