SF.net SVN: matplotlib: [3920] trunk/matplotlib/lib/matplotlib/patches.py
Revision: 3920 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3920&view=rev Author: jrevans Date: 2007-10-05 09:29:17 -0700 (Fri, 05 Oct 2007) Log Message: --- Fixed a typo in the Ellipse code that was causing the ellipse angle to go in the wrong direction. When I was testing I had forgotten to turn off the axes inversion test. Modified Paths: -- trunk/matplotlib/lib/matplotlib/patches.py Modified: trunk/matplotlib/lib/matplotlib/patches.py === --- trunk/matplotlib/lib/matplotlib/patches.py 2007-10-05 06:58:15 UTC (rev 3919) +++ trunk/matplotlib/lib/matplotlib/patches.py 2007-10-05 16:29:17 UTC (rev 3920) @@ -815,8 +815,8 @@ angle = self.angle * math.pi / 180.0 # convert the angle to polar coordinates (Assume r = 1.0) -anglex = math.cos(-angle) -angley = math.sin(-angle) +anglex = math.cos(angle) +angley = math.sin(angle) # transform the angle vertex and the origin angle_verts = npy.array(((anglex, angley), (0.0, 0.0)), npy.float) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [3921] trunk/matplotlib/lib/matplotlib/axes.py
Revision: 3921 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3921&view=rev Author: jrevans Date: 2007-10-05 10:01:36 -0700 (Fri, 05 Oct 2007) Log Message: --- Fixed an error in calculating the mid-point of a bar since the values are now lists and not arrays, they need to be iterated to perform the arithmetic. Modified Paths: -- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py === --- trunk/matplotlib/lib/matplotlib/axes.py 2007-10-05 16:29:17 UTC (rev 3920) +++ trunk/matplotlib/lib/matplotlib/axes.py 2007-10-05 17:01:36 UTC (rev 3921) @@ -3262,9 +3262,9 @@ pass elif align == 'center': if orientation == 'vertical': -left = left - width/2. +left = [left[i] - width[i]/2. for i in range(len(left))] elif orientation == 'horizontal': -bottom = bottom-height/2. +bottom = [bottom[i] - height[i]/2. for i in range(len(bottom))] else: raise ValueError, 'invalid alignment: %s' % align This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [3922] trunk/toolkits/basemap/MANIFEST.in
Revision: 3922 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3922&view=rev Author: jswhit Date: 2007-10-05 11:30:39 -0700 (Fri, 05 Oct 2007) Log Message: --- fix typo. Modified Paths: -- trunk/toolkits/basemap/MANIFEST.in Modified: trunk/toolkits/basemap/MANIFEST.in === --- trunk/toolkits/basemap/MANIFEST.in 2007-10-05 17:01:36 UTC (rev 3921) +++ trunk/toolkits/basemap/MANIFEST.in 2007-10-05 18:30:39 UTC (rev 3922) @@ -57,7 +57,7 @@ include examples/tissot.dbf include examples/tissot.shp include examples/tissot.shx -include examples/show_colorbar.py +include examples/show_colormaps.py include examples/plotprecip.py include examples/nws_precip_conus_20061222.nc include examples/README This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [3923] trunk/matplotlib
Revision: 3923
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3923&view=rev
Author: dsdale
Date: 2007-10-05 11:56:10 -0700 (Fri, 05 Oct 2007)
Log Message:
---
remove generator expressions from texmanager and mpltraits
Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/config/mpltraits.py
trunk/matplotlib/lib/matplotlib/texmanager.py
Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG 2007-10-05 18:30:39 UTC (rev 3922)
+++ trunk/matplotlib/CHANGELOG 2007-10-05 18:56:10 UTC (rev 3923)
@@ -1,3 +1,6 @@
+2007-10-05 remove generator expressions from texmanager and mpltraits.
+ generator expressions are not supported by python-2.3 - DSD
+
2007-10-01 Made matplotlib.use() raise an exception if called after
backends has been imported.
Modified: trunk/matplotlib/lib/matplotlib/config/mpltraits.py
===
--- trunk/matplotlib/lib/matplotlib/config/mpltraits.py 2007-10-05 18:30:39 UTC
(rev 3922)
+++ trunk/matplotlib/lib/matplotlib/config/mpltraits.py 2007-10-05 18:56:10 UTC
(rev 3923)
@@ -46,7 +46,7 @@
def info(self):
be = self.backends.keys()
be.sort
-return "one of %s"% ', '.join('%s'%i for i in be)
+return "one of %s"% ', '.join(['%s'%i for i in be])
class BoolHandler(T.TraitHandler):
@@ -73,7 +73,7 @@
return self.error(object, name, value)
def info(self):
-return "one of %s"% ', '.join('%s'%i for i in self.bools.keys())
+return "one of %s"% ', '.join(['%s'%i for i in self.bools.keys()])
flexible_true = T.Trait(True, BoolHandler())
flexible_false = T.Trait(False, BoolHandler())
Modified: trunk/matplotlib/lib/matplotlib/texmanager.py
===
--- trunk/matplotlib/lib/matplotlib/texmanager.py 2007-10-05 18:30:39 UTC
(rev 3922)
+++ trunk/matplotlib/lib/matplotlib/texmanager.py 2007-10-05 18:56:10 UTC
(rev 3923)
@@ -110,7 +110,7 @@
_rc_cache = None
_rc_cache_keys = ('text.latex.preamble', )\
- + tuple('font.'+n for n in ('family', ) + font_families)
+ + tuple(['font.'+n for n in ('family', ) + font_families])
def __init__(self):
@@ -125,7 +125,7 @@
fontconfig = [self.font_family]
for font_family, font_family_attr in \
-((ff, ff.replace('-', '_')) for ff in self.font_families):
+[(ff, ff.replace('-', '_')) for ff in self.font_families]:
for font in rcParams['font.'+font_family]:
if font.lower() in self.font_info:
found_font = self.font_info[font.lower()]
@@ -163,7 +163,7 @@
def get_font_config(self):
"Reinitializes self if rcParams self depends on have changed."
if self._rc_cache is None:
-self._rc_cache = dict((k,None) for k in self._rc_cache_keys)
+self._rc_cache = dict([(k,None) for k in self._rc_cache_keys])
changed = [par for par in self._rc_cache_keys if rcParams[par] != \
self._rc_cache[par]]
if changed:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [3925] branches/transforms
Revision: 3925
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3925&view=rev
Author: mdboom
Date: 2007-10-05 12:37:18 -0700 (Fri, 05 Oct 2007)
Log Message:
---
Merged revisions 3909-3924 via svnmerge from
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib
r3910 | jrevans | 2007-10-03 18:23:48 -0400 (Wed, 03 Oct 2007) | 4 lines
Moved a couple of routines from the Agg version of the FigureCanvas to the
base qt
version where they belong. Added a couple of overloaded qt methods that
should be
there and reduce having to inherit when embedding in another QWidget.
r3911 | jrevans | 2007-10-03 19:05:30 -0400 (Wed, 03 Oct 2007) | 3 lines
Removed an erroneous print statment in backend_qt.py.
Added a feature to keep track of axes inversions.
r3916 | sameerd | 2007-10-04 17:39:07 -0400 (Thu, 04 Oct 2007) | 3 lines
Fix for "NameError: global name 'ones' is not defined"
r3917 | jrevans | 2007-10-04 18:13:18 -0400 (Thu, 04 Oct 2007) | 5 lines
axes.py: Reverted get/set xlim/ylim methods to original state
Added get/set xbound/ybound to handle axes inversion maintenance
Removed inverted axes flags
patches.py: Added some logic to xform an Ellipse angle as per the Ellipse's
transformation.
r3918 | efiring | 2007-10-05 02:18:25 -0400 (Fri, 05 Oct 2007) | 2 lines
Minor cleanup of arguments and docstring in contour
r3919 | efiring | 2007-10-05 02:58:15 -0400 (Fri, 05 Oct 2007) | 2 lines
Tweaked automatic contour level calculation
r3920 | jrevans | 2007-10-05 12:29:17 -0400 (Fri, 05 Oct 2007) | 2 lines
Fixed a typo in the Ellipse code that was causing the ellipse angle to go in
the wrong direction. When I was testing I had forgotten to turn off the axes
inversion test.
r3921 | jrevans | 2007-10-05 13:01:36 -0400 (Fri, 05 Oct 2007) | 2 lines
Fixed an error in calculating the mid-point of a bar since the values are now
lists and not arrays, they need to be iterated to perform the arithmetic.
r3923 | dsdale | 2007-10-05 14:56:10 -0400 (Fri, 05 Oct 2007) | 1 line
remove generator expressions from texmanager and mpltraits
Modified Paths:
--
branches/transforms/CHANGELOG
branches/transforms/examples/simple_plot.py
branches/transforms/lib/matplotlib/axes.py
branches/transforms/lib/matplotlib/config/mpltraits.py
branches/transforms/lib/matplotlib/contour.py
branches/transforms/lib/matplotlib/texmanager.py
branches/transforms/lib/matplotlib/ticker.py
Property Changed:
branches/transforms/
Property changes on: branches/transforms
___
Name: svnmerge-integrated
- /trunk/matplotlib:1-3908
+ /trunk/matplotlib:1-3924
Modified: branches/transforms/CHANGELOG
===
--- branches/transforms/CHANGELOG 2007-10-05 19:25:33 UTC (rev 3924)
+++ branches/transforms/CHANGELOG 2007-10-05 19:37:18 UTC (rev 3925)
@@ -1,3 +1,6 @@
+2007-10-05 remove generator expressions from texmanager and mpltraits.
+ generator expressions are not supported by python-2.3 - DSD
+
2007-10-01 Made matplotlib.use() raise an exception if called after
backends has been imported.
Modified: branches/transforms/examples/simple_plot.py
===
--- branches/transforms/examples/simple_plot.py 2007-10-05 19:25:33 UTC (rev
3924)
+++ branches/transforms/examples/simple_plot.py 2007-10-05 19:37:18 UTC (rev
3925)
@@ -17,4 +17,6 @@
#savefig('simple_plot.png')
savefig('simple_plot')
+axes().set_xlim(5, -5)
+
show()
Modified: branches/transforms/lib/matplotlib/axes.py
===
--- branches/transforms/lib/matplotlib/axes.py 2007-10-05 19:25:33 UTC (rev
3924)
+++ branches/transforms/lib/matplotlib/axes.py 2007-10-05 19:37:18 UTC (rev
3925)
@@ -844,9 +844,9 @@
return
-xmin,xmax = self.get_xlim()
+xmin,xmax = self.get_xbound()
xsize = max(math.fabs(xmax-xmin), 1e-30)
-ymin,ymax = self.get_ylim()
+ymin,ymax = self.get_ybound()
ysize = max(math.fabs(ymax-ymin), 1e-30)
l,b,w,h = self.get_position(original=True).bounds
@@ -895,14 +895,14 @@
yc = 0.5*(ymin+ymax)
y0 = yc - Ysize/2.0
y1 = yc + Ysize/2.0
-self.set_ylim((y0, y1))
+self.set_ybound((y0, y1))
#print 'New y0, y1:', y0, y1
#print 'New ysize, ysize/xsize', y1-y0, (y1-y0)/xsize
else:
xc = 0.5*(xmin+xmax)
x0 = xc - Xsize/2.0
x1 = xc + Xsize/2.0
-self.set_xlim((x0, x1))
+self.set_xbound((x0, x1))
#prin
SF.net SVN: matplotlib: [3926] trunk/matplotlib/lib/matplotlib/axes.py
Revision: 3926
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3926&view=rev
Author: efiring
Date: 2007-10-05 15:11:32 -0700 (Fri, 05 Oct 2007)
Log Message:
---
Fixed numpification bug in pcolor argument handling
Modified Paths:
--
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===
--- trunk/matplotlib/lib/matplotlib/axes.py 2007-10-05 19:37:18 UTC (rev
3925)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2007-10-05 22:11:32 UTC (rev
3926)
@@ -4408,7 +4408,30 @@
return im
+def _pcolorargs(self, funcname, *args):
+if len(args)==1:
+C = args[0]
+numRows, numCols = C.shape
+X, Y = npy.meshgrid(npy.arange(numCols+1), npy.arange(numRows+1) )
+elif len(args)==3:
+X, Y, C = args
+else:
+raise TypeError(
+'Illegal arguments to %s; see help(%s)' % (funcname, funcname))
+Nx = X.shape[-1]
+Ny = Y.shape[0]
+if len(X.shape) <> 2 or X.shape[0] == 1:
+x = X.reshape(1,Nx)
+X = x.repeat(Ny, axis=0)
+if len(Y.shape) <> 2 or Y.shape[1] == 1:
+y = Y.reshape(Ny, 1)
+Y = y.repeat(Nx, axis=1)
+if X.shape != Y.shape:
+raise TypeError(
+'Incompatible X, Y inputs to %s; see help(%s)' % (funcname,
funcname))
+return X, Y, C
+
def pcolor(self, *args, **kwargs):
"""
pcolor(*args, **kwargs): pseudocolor plot of a 2-D array
@@ -4520,25 +4543,9 @@
vmax = kwargs.pop('vmax', None)
shading = kwargs.pop('shading', 'flat')
-if len(args)==1:
-C = args[0]
-numRows, numCols = C.shape
-X, Y = npy.meshgrid(npy.arange(numCols+1), npy.arange(numRows+1) )
-elif len(args)==3:
-X, Y, C = args
-numRows, numCols = C.shape
-else:
-raise TypeError, 'Illegal arguments to pcolor; see help(pcolor)'
+X, Y, C = self._pcolorargs('pcolor', *args)
+Ny, Nx = X.shape
-Nx = X.shape[-1]
-Ny = Y.shape[0]
-if len(X.shape) <> 2 or X.shape[0] == 1:
-X = X.ravel().resize((Ny, Nx))
-if len(Y.shape) <> 2 or Y.shape[1] == 1:
-Y = Y.ravel().resize((Nx, Ny)).T
-
-
-
# convert to MA, if necessary.
C = ma.asarray(C)
X = ma.asarray(X)
@@ -4673,23 +4680,9 @@
shading = kwargs.pop('shading', 'flat')
edgecolors = kwargs.pop('edgecolors', 'None')
-if len(args)==1:
-C = args[0]
-numRows, numCols = C.shape
-X, Y = npy.meshgrid(npy.arange(numCols+1), npy.arange(numRows+1) )
-elif len(args)==3:
-X, Y, C = args
-numRows, numCols = C.shape
-else:
-raise TypeError, 'Illegal arguments to pcolormesh; see
help(pcolormesh)'
+X, Y, C = self._pcolorargs('pcolormesh', *args)
+Ny, Nx = X.shape
-Nx = X.shape[-1]
-Ny = Y.shape[0]
-if len(X.shape) <> 2 or X.shape[0] == 1:
-X = X.ravel().resize((Ny, Nx))
-if len(Y.shape) <> 2 or Y.shape[1] == 1:
-Y = Y.ravel().resize((Nx, Ny)).T
-
# convert to one dimensional arrays
C = ma.ravel(C[0:Ny-1, 0:Nx-1]) # data point in each cell is value at
lower left corner
X = X.ravel()
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
