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: <he...@us...> - 2009-05-23 14:31:19
|
Revision: 7137
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7137&view=rev
Author: heeres
Date: 2009-05-23 14:31:14 +0000 (Sat, 23 May 2009)
Log Message:
-----------
mplot3d: contourf3d, bar / zordering
Modified Paths:
--------------
trunk/matplotlib/examples/mplot3d/demo.py
trunk/matplotlib/lib/mpl_toolkits/mplot3d/art3d.py
trunk/matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py
trunk/matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py
Modified: trunk/matplotlib/examples/mplot3d/demo.py
===================================================================
--- trunk/matplotlib/examples/mplot3d/demo.py 2009-05-22 18:43:26 UTC (rev 7136)
+++ trunk/matplotlib/examples/mplot3d/demo.py 2009-05-23 14:31:14 UTC (rev 7137)
@@ -133,6 +133,6 @@
test_plot()
test_polys()
test_scatter2D()
-# test_bar2D()
+ test_bar2D()
plt.show()
Modified: trunk/matplotlib/lib/mpl_toolkits/mplot3d/art3d.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/mplot3d/art3d.py 2009-05-22 18:43:26 UTC (rev 7136)
+++ trunk/matplotlib/lib/mpl_toolkits/mplot3d/art3d.py 2009-05-23 14:31:14 UTC (rev 7137)
@@ -91,12 +91,21 @@
self._segments3d = segments
LineCollection.set_segments(self, [])
- def draw(self, renderer):
+ def do_3d_projection(self, renderer):
xyslist = [
proj3d.proj_trans_points(points, renderer.M) for points in
self._segments3d]
segments_2d = [zip(xs,ys) for (xs,ys,zs) in xyslist]
LineCollection.set_segments(self, segments_2d)
+
+ minz = 1e9
+ for (xs, ys, zs) in xyslist:
+ minz = min(minz, min(zs))
+ return minz
+
+ def draw(self, renderer, project=False):
+ if project:
+ self.do_3d_projection(renderer)
LineCollection.draw(self, renderer)
def line_collection_2d_to_3d(col, z=0, dir='z'):
@@ -123,13 +132,16 @@
def get_facecolor(self):
return self._facecolor2d
- def draw(self, renderer):
+ def do_3d_projection(self, renderer):
s = self._segment3d
xs, ys, zs = zip(*s)
vxs,vys,vzs,vis = proj3d.proj_transform_clip(xs,ys,zs, renderer.M)
self._path2d = mpath.Path(zip(vxs, vys))
# FIXME: coloring
self._facecolor2d = self._facecolor3d
+ return min(vzs)
+
+ def draw(self, renderer):
Patch.draw(self, renderer)
def patch_2d_to_3d(patch, z=0, dir='z'):
@@ -149,7 +161,7 @@
self._facecolor3d = self.get_facecolor()
self._edgecolor3d = self.get_edgecolor()
- def draw(self, renderer):
+ def do_3d_projection(self, renderer):
xs,ys,zs = self._offsets3d
vxs,vys,vzs,vis = proj3d.proj_transform_clip(xs,ys,zs, renderer.M)
#FIXME: mpl allows us no way to unset the collection alpha value
@@ -157,6 +169,10 @@
self.set_facecolors(zalpha(self._facecolor3d, vzs))
self.set_edgecolors(zalpha(self._edgecolor3d, vzs))
PatchCollection.set_offsets(self, zip(vxs, vys))
+
+ return min(vzs)
+
+ def draw(self, renderer):
PatchCollection.draw(self, renderer)
def patch_collection_2d_to_3d(col, zs=0, dir='z'):
@@ -185,6 +201,7 @@
ones = np.ones(len(xs))
self._vec = np.array([xs,ys,zs,ones])
self._segis = segis
+ self._sort_zpos = min(zs)
def set_verts(self, verts, closed=True):
self.get_vector(verts)
@@ -196,28 +213,35 @@
self._facecolors3d = PolyCollection.get_facecolors(self)
self._edgecolors3d = self.get_edgecolors()
- def get_facecolors(self):
- return self._facecolors2d
- get_facecolor = get_facecolors
-
- def draw(self, renderer):
- txs, tys, tzs, tis = proj3d.proj_transform_vec_clip(self._vec, renderer.M)
- xyslist = [(txs[si:ei], tys[si:ei], tzs[si:ei], tis[si:ei]) \
+ def do_3d_projection(self, renderer):
+ txs, tys, tzs = proj3d.proj_transform_vec(self._vec, renderer.M)
+ xyzlist = [(txs[si:ei], tys[si:ei], tzs[si:ei]) \
for si, ei in self._segis]
colors = self._facecolors3d
- #
+
# if required sort by depth (furthest drawn first)
if self._zsort:
- z_segments_2d = [(min(zs),max(tis),zip(xs,ys),c) for
- (xs,ys,zs,tis),c in zip(xyslist,colors)]
+ z_segments_2d = [(min(zs),zip(xs,ys),c) for
+ (xs,ys,zs),c in zip(xyzlist,colors)]
z_segments_2d.sort()
z_segments_2d.reverse()
else:
raise ValueError, "whoops"
- segments_2d = [s for z,i,s,c in z_segments_2d if i]
- colors = [c for z,i,s,c in z_segments_2d if i]
+ segments_2d = [s for z,s,c in z_segments_2d]
+ colors = [c for z,s,c in z_segments_2d]
PolyCollection.set_verts(self, segments_2d)
self._facecolors2d = colors
+
+ # Return zorder value
+ zvec = np.array([[0], [0], [self._sort_zpos], [1]])
+ ztrans = proj3d.proj_transform_vec(zvec, renderer.M)
+ return ztrans[2][0]
+
+ def get_facecolors(self):
+ return self._facecolors2d
+ get_facecolor = get_facecolors
+
+ def draw(self, renderer):
return Collection.draw(self, renderer)
def poly_collection_2d_to_3d(col, zs=None, dir='z'):
Modified: trunk/matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py 2009-05-22 18:43:26 UTC (rev 7136)
+++ trunk/matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py 2009-05-23 14:31:14 UTC (rev 7137)
@@ -86,7 +86,7 @@
xdw = (0.9/self.dist)
ydwl = (0.95/self.dist)
ydw = (0.9/self.dist)
- #
+
self.set_xlim(-xdwl,xdw)
self.set_ylim(-ydwl,ydw)
@@ -166,6 +166,22 @@
renderer.eye = self.eye
renderer.get_axis_position = self.get_axis_position
+ # Calculate projection of collections and zorder them
+ zlist = [(col.do_3d_projection(renderer), col) \
+ for col in self.collections]
+ zlist.sort()
+ zlist.reverse()
+ for i, (z, col) in enumerate(zlist):
+ col.zorder = i
+
+ # Calculate projection of patches and zorder them
+ zlist = [(patch.do_3d_projection(renderer), patch) \
+ for patch in self.patches]
+ zlist.sort()
+ zlist.reverse()
+ for i, (z, patch) in enumerate(zlist):
+ patch.zorder = i
+
self.w_xaxis.draw(renderer)
self.w_yaxis.draw(renderer)
self.w_zaxis.draw(renderer)
@@ -179,7 +195,7 @@
zhigh = tc[0][2]>tc[2][2]
return xhigh,yhigh,zhigh
- def update_datalim(self, xys):
+ def update_datalim(self, xys, **kwargs):
pass
def update_datalim_numerix(self, x, y):
@@ -293,12 +309,12 @@
# look into the middle of the new coordinates
R = np.array([0.5,0.5,0.5])
- #
+
xp = R[0] + np.cos(razim)*np.cos(relev)*self.dist
yp = R[1] + np.sin(razim)*np.cos(relev)*self.dist
zp = R[2] + np.sin(relev)*self.dist
E = np.array((xp, yp, zp))
- #
+
self.eye = E
self.vvec = R - E
self.vvec = self.vvec / proj3d.mod(self.vvec)
@@ -393,7 +409,7 @@
ldists.sort()
# nearest edge
edgei = ldists[0][1]
- #
+
p0,p1 = edges[edgei]
# scale the z value to match
@@ -403,7 +419,6 @@
d1 = np.hypot(x1-xd,y1-yd)
dt = d0+d1
z = d1/dt * z0 + d0/dt * z1
- #print 'mid', edgei, d0, d1, z0, z1, z
x,y,z = proj3d.inv_transform(xd,yd,z,self.M)
@@ -440,8 +455,8 @@
if self.button_pressed == 1:
# rotate viewing point
# get the x and y pixel coords
- if dx == 0 and dy == 0: return
- #
+ if dx == 0 and dy == 0:
+ return
self.elev = axis3d.norm_angle(self.elev - (dy/h)*180)
self.azim = axis3d.norm_angle(self.azim - (dx/w)*180)
self.get_proj()
@@ -450,7 +465,6 @@
# pan view
# project xv,yv,zv -> xw,yw,zw
# pan
- #
pass
elif self.button_pressed == 3:
# zoom view
@@ -469,7 +483,7 @@
def set_xlabel(self, xlabel, fontdict=None, **kwargs):
#par = cbook.popd(kwargs, 'par',None)
#label.set_par(par)
- #
+
label = self.w_xaxis.get_label()
label.set_text(xlabel)
if fontdict is not None: label.update(fontdict)
@@ -524,7 +538,7 @@
tX,tY,tZ = np.transpose(X), np.transpose(Y), np.transpose(Z)
rstride = kwargs.pop('rstride', 10)
cstride = kwargs.pop('cstride', 10)
- #
+
polys = []
boxes = []
for rs in np.arange(0,rows-1,rstride):
@@ -543,7 +557,7 @@
ps.append(z)
boxes.append(map(np.array,zip(*corners)))
polys.append(zip(*ps))
- #
+
lines = []
shade = []
for box in boxes:
@@ -552,7 +566,7 @@
n = n/proj3d.mod(n)*5
shade.append(np.dot(n,[-1,-1,0.5]))
lines.append((box[0],n+box[0]))
- #
+
color = np.array([0,0,1,1])
norm = Normalize(min(shade),max(shade))
colors = [color * (0.5+norm(v)*0.5) for v in shade]
@@ -560,7 +574,7 @@
polyc = art3d.Poly3DCollection(polys, facecolors=colors, *args, **kwargs)
polyc._zsort = 1
self.add_collection(polyc)
- #
+
self.auto_scale_xyz(X,Y,Z, had_data)
return polyc
@@ -578,11 +592,11 @@
xlines = [X[i] for i in rii]
ylines = [Y[i] for i in rii]
zlines = [Z[i] for i in rii]
- #
+
txlines = [tX[i] for i in cii]
tylines = [tY[i] for i in cii]
tzlines = [tZ[i] for i in cii]
- #
+
lines = [zip(xl,yl,zl) for xl,yl,zl in zip(xlines,ylines,zlines)]
lines += [zip(xl,yl,zl) for xl,yl,zl in zip(txlines,tylines,tzlines)]
linec = self.add_lines(lines, *args, **kwargs)
@@ -614,6 +628,7 @@
zs = [z1] * (len(linec.get_paths()[0])/2)
zs += [z2] * (len(linec.get_paths()[0])/2)
art3d.poly_collection_2d_to_3d(linec, zs)
+
self.auto_scale_xyz(X,Y,Z, had_data)
return cset
@@ -701,6 +716,7 @@
def bar(self, left, height, z=0, dir='z', *args, **kwargs):
had_data = self.has_data()
+
patches = self.wrapped.bar(left, height, *args, **kwargs)
verts = []
for p in patches:
@@ -863,6 +879,6 @@
test_plot()
test_polys()
test_scatter2D()
-# test_bar2D()
+ test_bar2D()
pylab.show()
Modified: trunk/matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py 2009-05-22 18:43:26 UTC (rev 7136)
+++ trunk/matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py 2009-05-23 14:31:14 UTC (rev 7137)
@@ -85,7 +85,7 @@
# data and viewing intervals for this direction
self.d_interval = d_intervalx
self.v_interval = v_intervalx
- #
+
axis.XAxis.__init__(self, axes, *args, **kwargs)
self.line = lines.Line2D(xdata=(0,0),ydata=(0,0),
linewidth=0.75,
@@ -248,7 +248,7 @@
lines = zip(xyz1, xyz0, xyz2)
self.gridlines.set_segments(lines)
self.gridlines.set_color([(0.9,0.9,0.9,1)] * len(lines))
- self.gridlines.draw(renderer)
+ self.gridlines.draw(renderer, project=True)
# Draw ticks
tickdir = info['tickdir']
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-05-22 18:43:33
|
Revision: 7136
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7136&view=rev
Author: mdboom
Date: 2009-05-22 18:43:26 +0000 (Fri, 22 May 2009)
Log Message:
-----------
Fix broken example.
Modified Paths:
--------------
trunk/matplotlib/examples/api/custom_projection_example.py
Modified: trunk/matplotlib/examples/api/custom_projection_example.py
===================================================================
--- trunk/matplotlib/examples/api/custom_projection_example.py 2009-05-22 17:50:32 UTC (rev 7135)
+++ trunk/matplotlib/examples/api/custom_projection_example.py 2009-05-22 18:43:26 UTC (rev 7136)
@@ -27,10 +27,6 @@
# projection='hammer')``.
name = 'hammer'
- # The number of interpolation steps when converting from straight
- # lines to curves. (See ``transform_path``).
- RESOLUTION = 75
-
def __init__(self, *args, **kwargs):
Axes.__init__(self, *args, **kwargs)
self.set_aspect(0.5, adjustable='box', anchor='C')
@@ -91,7 +87,7 @@
# 1) The core transformation from data space into
# rectilinear space defined in the HammerTransform class.
- self.transProjection = self.HammerTransform(self.RESOLUTION)
+ self.transProjection = self.HammerTransform()
# 2) The above has an output range that is not in the unit
# rectangle, so scale and translate it so it fits correctly
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-05-22 17:50:41
|
Revision: 7135
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7135&view=rev
Author: efiring
Date: 2009-05-22 17:50:32 +0000 (Fri, 22 May 2009)
Log Message:
-----------
Fix typo in r7131
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2009-05-22 17:36:28 UTC (rev 7134)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2009-05-22 17:50:32 UTC (rev 7135)
@@ -1145,7 +1145,7 @@
``transform_path_affine(transform_path_non_affine(values))``.
"""
return Path(self.transform_non_affine(path.vertices), path.codes,
- self._interpolation_steps)
+ path._interpolation_steps)
def transform_angles(self, angles, pts, radians=False, pushoff=1e-5):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-05-22 17:36:40
|
Revision: 7134
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7134&view=rev
Author: efiring
Date: 2009-05-22 17:36:28 +0000 (Fri, 22 May 2009)
Log Message:
-----------
Make polar_bar work with new Path._interpolation_steps attribute
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-05-22 14:24:55 UTC (rev 7133)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-05-22 17:36:28 UTC (rev 7134)
@@ -4309,6 +4309,7 @@
)
label = '_nolegend_'
r.update(kwargs)
+ r.get_path()._interpolation_steps = 100
#print r.get_label(), label, 'label' in kwargs
self.add_patch(r)
patches.append(r)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-05-22 14:25:00
|
Revision: 7133
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7133&view=rev
Author: jdh2358
Date: 2009-05-22 14:24:55 +0000 (Fri, 22 May 2009)
Log Message:
-----------
modified Tony's patch to coimply w/ mpl properties
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-05-22 14:22:03 UTC (rev 7132)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-05-22 14:24:55 UTC (rev 7133)
@@ -1131,15 +1131,21 @@
self.radius = radius
Ellipse.__init__(self, xy, radius*2, radius*2, **kwargs)
__init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
-
- def radius():
- def fget(self):
- return self.width / 2.
- def fset(self, radius):
- self.width = self.height = 2 * radius
- return locals()
- radius = property(**radius())
+ def set_radius(self, radius):
+ """
+ Set the radius of the circle
+
+ ACCEPTS: float
+ """
+ self.width = self.height = 2 * radius
+
+ def get_radius(self):
+ 'return the radius of the circle'
+ return self.width / 2.
+
+ radius = property(get_radius, set_radius)
+
class Arc(Ellipse):
"""
An elliptical arc. Because it performs various optimizations, it
@@ -2589,7 +2595,7 @@
def connect(self, posA, posB):
x1, y1 = posA
x20, y20 = x2, y2 = posB
-
+
x12, y12 = (x1 + x2)/2., (y1 + y2)/2.
theta1 = math.atan2(y2-y1, x2-x1)
@@ -2598,7 +2604,7 @@
ddx, ddy = dx/dd, dy/dd
armA, armB = self.armA, self.armB
-
+
if self.angle is not None:
#angle = self.angle % 180.
#if angle < 0. or angle > 180.:
@@ -2622,7 +2628,7 @@
else:
dl = 0.
-
+
#if armA > armB:
# armB = armA + dl
#else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-05-22 14:22:08
|
Revision: 7132
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7132&view=rev
Author: jdh2358
Date: 2009-05-22 14:22:03 +0000 (Fri, 22 May 2009)
Log Message:
-----------
Applied Tony's circle patch
Modified Paths:
--------------
trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py 2009-05-22 14:00:12 UTC (rev 7131)
+++ trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py 2009-05-22 14:22:03 UTC (rev 7132)
@@ -147,7 +147,7 @@
return True
def OnBang(self,event):
- bang_count = XRCCTRL(self.frame,"bang_count")
+ bang_count = xrc.XRCCTRL(self.frame,"bang_count")
bangs = bang_count.GetValue()
bangs = int(bangs)+1
bang_count.SetValue(str(bangs))
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-05-22 14:00:12 UTC (rev 7131)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-05-22 14:22:03 UTC (rev 7132)
@@ -1131,6 +1131,14 @@
self.radius = radius
Ellipse.__init__(self, xy, radius*2, radius*2, **kwargs)
__init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
+
+ def radius():
+ def fget(self):
+ return self.width / 2.
+ def fset(self, radius):
+ self.width = self.height = 2 * radius
+ return locals()
+ radius = property(**radius())
class Arc(Ellipse):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-05-22 14:01:23
|
Revision: 7131
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7131&view=rev
Author: mdboom
Date: 2009-05-22 14:00:12 +0000 (Fri, 22 May 2009)
Log Message:
-----------
Fix problem with polar grid lines by specifying the number of interpolation steps on a per-Path basis. This isn't really a public API -- it is intended for internal use only.
Modified Paths:
--------------
trunk/matplotlib/doc/api/api_changes.rst
trunk/matplotlib/examples/api/custom_projection_example.py
trunk/matplotlib/examples/pylab_examples/polar_bar.py
trunk/matplotlib/lib/matplotlib/axis.py
trunk/matplotlib/lib/matplotlib/cbook.py
trunk/matplotlib/lib/matplotlib/lines.py
trunk/matplotlib/lib/matplotlib/path.py
trunk/matplotlib/lib/matplotlib/projections/polar.py
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/doc/api/api_changes.rst
===================================================================
--- trunk/matplotlib/doc/api/api_changes.rst 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/doc/api/api_changes.rst 2009-05-22 14:00:12 UTC (rev 7131)
@@ -17,6 +17,14 @@
.. _configobj: http://www.voidspace.org.uk/python/configobj.html
.. _`enthought.traits`: http://code.enthought.com/projects/traits
+Changes beyond 0.98.x
+=====================
+
+* Polar plots no longer accept a resolution kwarg. Instead, each Path
+ must specify its own number of interpolation steps. This is
+ unlikely to be a user-visible change -- if interpolation of data is
+ required, that should be done before passing it to matplotlib.
+
Changes for 0.98.x
==================
* psd(), csd(), and cohere() will now automatically wrap negative
Modified: trunk/matplotlib/examples/api/custom_projection_example.py
===================================================================
--- trunk/matplotlib/examples/api/custom_projection_example.py 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/examples/api/custom_projection_example.py 2009-05-22 14:00:12 UTC (rev 7131)
@@ -373,15 +373,6 @@
output_dims = 2
is_separable = False
- def __init__(self, resolution):
- """
- Create a new Hammer transform. Resolution is the number of steps
- to interpolate between each input line segment to approximate its
- path in curved Hammer space.
- """
- Transform.__init__(self)
- self._resolution = resolution
-
def transform(self, ll):
"""
Override the transform method to implement the custom transform.
@@ -410,11 +401,11 @@
# ``transform_path``.
def transform_path(self, path):
vertices = path.vertices
- ipath = path.interpolated(self._resolution)
+ ipath = path.interpolated(path._interpolation_steps)
return Path(self.transform(ipath.vertices), ipath.codes)
def inverted(self):
- return HammerAxes.InvertedHammerTransform(self._resolution)
+ return HammerAxes.InvertedHammerTransform()
inverted.__doc__ = Transform.inverted.__doc__
class InvertedHammerTransform(Transform):
@@ -422,10 +413,6 @@
output_dims = 2
is_separable = False
- def __init__(self, resolution):
- Transform.__init__(self)
- self._resolution = resolution
-
def transform(self, xy):
x = xy[:, 0:1]
y = xy[:, 1:2]
@@ -440,7 +427,7 @@
def inverted(self):
# The inverse of the inverse is the original transform... ;)
- return HammerAxes.HammerTransform(self._resolution)
+ return HammerAxes.HammerTransform()
inverted.__doc__ = Transform.inverted.__doc__
# Now register the projection with matplotlib so the user can select
Modified: trunk/matplotlib/examples/pylab_examples/polar_bar.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/polar_bar.py 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/examples/pylab_examples/polar_bar.py 2009-05-22 14:00:12 UTC (rev 7131)
@@ -7,7 +7,7 @@
# force square figure and square axes looks better for polar, IMO
fig = figure(figsize=(8,8))
-ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, resolution=50)
+ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True)
N = 20
theta = np.arange(0.0, 2*np.pi, 2*np.pi/N)
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2009-05-22 14:00:12 UTC (rev 7131)
@@ -16,6 +16,7 @@
import matplotlib.transforms as mtransforms
import matplotlib.units as munits
+GRIDLINE_INTERPOLATION_STEPS = 180
class Tick(artist.Artist):
"""
@@ -308,6 +309,7 @@
linewidth=rcParams['grid.linewidth'],
)
l.set_transform(self.axes.get_xaxis_transform())
+ l.get_path()._interpolation_steps = GRIDLINE_INTERPOLATION_STEPS
self._set_artist_props(l)
return l
@@ -437,6 +439,7 @@
)
l.set_transform(self.axes.get_yaxis_transform())
+ l.get_path()._interpolation_steps = GRIDLINE_INTERPOLATION_STEPS
self._set_artist_props(l)
return l
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-05-22 14:00:12 UTC (rev 7131)
@@ -1177,6 +1177,9 @@
def simple_linear_interpolation(a, steps):
+ if steps == 1:
+ return a
+
steps = np.floor(steps)
new_length = ((len(a) - 1) * steps) + 1
new_shape = list(a.shape)
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2009-05-22 14:00:12 UTC (rev 7131)
@@ -443,7 +443,11 @@
self._subslice = False
if len(x) > 100 and self._is_sorted(x):
self._subslice = True
- self._path = Path(self._xy)
+ if hasattr(self, '_path'):
+ interpolation_steps = self._path._interpolation_steps
+ else:
+ interpolation_steps = 1
+ self._path = Path(self._xy, None, interpolation_steps)
self._transformed_path = None
self._invalid = False
Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/lib/matplotlib/path.py 2009-05-22 14:00:12 UTC (rev 7131)
@@ -80,7 +80,7 @@
code_type = np.uint8
- def __init__(self, vertices, codes=None):
+ def __init__(self, vertices, codes=None, _interpolation_steps=1):
"""
Create a new path with the given vertices and codes.
@@ -100,6 +100,11 @@
to NaNs which are then handled correctly by the Agg
PathIterator and other consumers of path data, such as
:meth:`iter_segments`.
+
+ *interpolation_steps* is used as a hint to certain projections,
+ such as Polar, that this path should be linearly interpolated
+ immediately before drawing. This attribute is primarily an
+ implementation detail and is not intended for public use.
"""
if ma.isMaskedArray(vertices):
vertices = vertices.astype(np.float_).filled(np.nan)
@@ -118,12 +123,10 @@
(len(vertices) >= 128 and
(codes is None or np.all(codes <= Path.LINETO))))
self.simplify_threshold = rcParams['path.simplify_threshold']
- # The following operation takes most of the time in this
- # initialization, and it does not appear to be used anywhere;
- # if it is occasionally needed, it could be made a property.
- #self.has_nonfinite = not np.isfinite(vertices).all()
+ self.has_nonfinite = not np.isfinite(vertices).all()
self.codes = codes
self.vertices = vertices
+ self._interpolation_steps = _interpolation_steps
@classmethod
def make_compound_path(cls, *args):
@@ -224,7 +227,8 @@
transformed result and automatically update when the
transform changes.
"""
- return Path(transform.transform(self.vertices), self.codes)
+ return Path(transform.transform(self.vertices), self.codes,
+ self._interpolation_steps)
def contains_point(self, point, transform=None):
"""
@@ -292,6 +296,9 @@
Returns a new path resampled to length N x steps. Does not
currently handle interpolating curves.
"""
+ if steps == 1:
+ return self
+
vertices = simple_linear_interpolation(self.vertices, steps)
codes = self.codes
if codes is not None:
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2009-05-22 14:00:12 UTC (rev 7131)
@@ -1,4 +1,5 @@
import math
+import warnings
import numpy as npy
@@ -32,15 +33,6 @@
output_dims = 2
is_separable = False
- def __init__(self, resolution):
- """
- Create a new polar transform. Resolution is the number of steps
- to interpolate between each input line segment to approximate its
- path in curved polar space.
- """
- Transform.__init__(self)
- self._resolution = resolution
-
def transform(self, tr):
xy = npy.zeros(tr.shape, npy.float_)
t = tr[:, 0:1]
@@ -59,7 +51,7 @@
vertices = path.vertices
if len(vertices) == 2 and vertices[0, 0] == vertices[1, 0]:
return Path(self.transform(vertices), path.codes)
- ipath = path.interpolated(self._resolution)
+ ipath = path.interpolated(path._interpolation_steps)
return Path(self.transform(ipath.vertices), ipath.codes)
transform_path.__doc__ = Transform.transform_path.__doc__
@@ -67,7 +59,7 @@
transform_path_non_affine.__doc__ = Transform.transform_path_non_affine.__doc__
def inverted(self):
- return PolarAxes.InvertedPolarTransform(self._resolution)
+ return PolarAxes.InvertedPolarTransform()
inverted.__doc__ = Transform.inverted.__doc__
class PolarAffine(Affine2DBase):
@@ -109,10 +101,6 @@
output_dims = 2
is_separable = False
- def __init__(self, resolution):
- Transform.__init__(self)
- self._resolution = resolution
-
def transform(self, xy):
x = xy[:, 0:1]
y = xy[:, 1:]
@@ -123,7 +111,7 @@
transform.__doc__ = Transform.transform.__doc__
def inverted(self):
- return PolarAxes.PolarTransform(self._resolution)
+ return PolarAxes.PolarTransform()
inverted.__doc__ = Transform.inverted.__doc__
class ThetaFormatter(Formatter):
@@ -177,8 +165,6 @@
return 0, vmax
- RESOLUTION = 1
-
def __init__(self, *args, **kwargs):
"""
Create a new Polar Axes for a polar plot.
@@ -192,8 +178,11 @@
self._rpad = 0.05
self.resolution = kwargs.pop('resolution', None)
- if self.resolution is None:
- self.resolution = self.RESOLUTION
+ if self.resolution not in (None, 1):
+ warnings.warn(
+ """The resolution kwarg to Polar plots is now ignored.
+If you need to interpolate data points, consider running
+cbook.simple_linear_interpolation on the data before passing to matplotlib.""")
Axes.__init__(self, *args, **kwargs)
self.set_aspect('equal', adjustable='box', anchor='C')
self.cla()
@@ -221,7 +210,7 @@
self.transScale = TransformWrapper(IdentityTransform())
# A (possibly non-linear) projection on the (already scaled) data
- self.transProjection = self.PolarTransform(self.resolution)
+ self.transProjection = self.PolarTransform()
# An affine transformation on the data, generally to limit the
# range of the axes
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2009-05-21 21:06:49 UTC (rev 7130)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2009-05-22 14:00:12 UTC (rev 7131)
@@ -1119,7 +1119,8 @@
In some cases, this transform may insert curves into the path
that began as line segments.
"""
- return Path(self.transform(path.vertices), path.codes)
+ return Path(self.transform(path.vertices), path.codes,
+ path._interpolation_steps)
def transform_path_affine(self, path):
"""
@@ -1143,7 +1144,8 @@
``transform_path(path)`` is equivalent to
``transform_path_affine(transform_path_non_affine(values))``.
"""
- return Path(self.transform_non_affine(path.vertices), path.codes)
+ return Path(self.transform_non_affine(path.vertices), path.codes,
+ self._interpolation_steps)
def transform_angles(self, angles, pts, radians=False, pushoff=1e-5):
"""
@@ -2181,7 +2183,8 @@
self._transformed_path = \
self._transform.transform_path_non_affine(self._path)
self._transformed_points = \
- Path(self._transform.transform_non_affine(self._path.vertices))
+ Path(self._transform.transform_non_affine(self._path.vertices),
+ None, self._path._interpolation_steps)
self._invalid = 0
def get_transformed_points_and_affine(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-05-21 21:07:09
|
Revision: 7130
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7130&view=rev
Author: astraw
Date: 2009-05-21 21:06:49 +0000 (Thu, 21 May 2009)
Log Message:
-----------
force buildbots to use noserunner with plugin support
Modified Paths:
--------------
trunk/matplotlib/buildout.cfg
Modified: trunk/matplotlib/buildout.cfg
===================================================================
--- trunk/matplotlib/buildout.cfg 2009-05-21 20:34:47 UTC (rev 7129)
+++ trunk/matplotlib/buildout.cfg 2009-05-21 21:06:49 UTC (rev 7130)
@@ -2,12 +2,13 @@
parts = PIL test python
develop = .
eggs = matplotlib
+find-links = http://astraw.com/mpl/
[test]
recipe = pbp.recipe.noserunner
-find-links = http://astraw.com/mpl/
+# Use Andrew Straw's custom packaging of noserunner with plugin support.
eggs =
- pbp.recipe.noserunner
+ pbp.recipe.noserunner==0.2.6.2
PIL
${buildout:eggs}
working-directory = ${buildout:directory}/test
@@ -25,8 +26,6 @@
[PIL]
# This recipe based on http://www.koansys.com/tech/install-plone-with-zopeskel-buildout-needs-pil
-# Build egg with Chris McDonough's custom packaging of setuptools-compatibile PIL
-# http://article.gmane.org/gmane.comp.web.zope.devel/13999
+# Build egg with Andrew Straw's custom packaging of setuptools-compatibile PIL without Tkinter.
recipe = zc.recipe.egg
egg = PIL==1.1.6
-find-links = http://astraw.com/mpl/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-05-21 20:34:58
|
Revision: 7129
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7129&view=rev
Author: astraw
Date: 2009-05-21 20:34:47 +0000 (Thu, 21 May 2009)
Log Message:
-----------
buildout test requires PIL. Custom PIL and noserunner download locations
Modified Paths:
--------------
trunk/matplotlib/buildout.cfg
Modified: trunk/matplotlib/buildout.cfg
===================================================================
--- trunk/matplotlib/buildout.cfg 2009-05-20 22:23:45 UTC (rev 7128)
+++ trunk/matplotlib/buildout.cfg 2009-05-21 20:34:47 UTC (rev 7129)
@@ -1,12 +1,14 @@
[buildout]
-parts = test python
+parts = PIL test python
develop = .
eggs = matplotlib
[test]
recipe = pbp.recipe.noserunner
+find-links = http://astraw.com/mpl/
eggs =
pbp.recipe.noserunner
+ PIL
${buildout:eggs}
working-directory = ${buildout:directory}/test
initialization =
@@ -20,3 +22,11 @@
interpreter = python
eggs =
${buildout:eggs}
+
+[PIL]
+# This recipe based on http://www.koansys.com/tech/install-plone-with-zopeskel-buildout-needs-pil
+# Build egg with Chris McDonough's custom packaging of setuptools-compatibile PIL
+# http://article.gmane.org/gmane.comp.web.zope.devel/13999
+recipe = zc.recipe.egg
+egg = PIL==1.1.6
+find-links = http://astraw.com/mpl/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-05-20 22:23:49
|
Revision: 7128
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7128&view=rev
Author: astraw
Date: 2009-05-20 22:23:45 +0000 (Wed, 20 May 2009)
Log Message:
-----------
Unit tests run correctly by buildout
This requires plugin support in pbp.recipe.noserunner, which will
hopefully be added in 0.2.7.
Modified Paths:
--------------
trunk/matplotlib/buildout.cfg
Modified: trunk/matplotlib/buildout.cfg
===================================================================
--- trunk/matplotlib/buildout.cfg 2009-05-20 20:54:33 UTC (rev 7127)
+++ trunk/matplotlib/buildout.cfg 2009-05-20 22:23:45 UTC (rev 7128)
@@ -8,7 +8,12 @@
eggs =
pbp.recipe.noserunner
${buildout:eggs}
-working-directory = ${buildout:directory}
+working-directory = ${buildout:directory}/test
+initialization =
+ sys.path.insert(0,'.')
+ from mplTest import MplNosePlugin
+plugins =
+ MplNosePlugin()
[python]
recipe = zc.recipe.egg
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ry...@us...> - 2009-05-20 20:54:48
|
Revision: 7127
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7127&view=rev
Author: ryanmay
Date: 2009-05-20 20:54:33 +0000 (Wed, 20 May 2009)
Log Message:
-----------
Add an empty matplotlibrc to the tests/ directory so that running the test suite uses the default matplotlib config.
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
Added Paths:
-----------
trunk/matplotlib/test/matplotlibrc
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-05-19 22:26:33 UTC (rev 7126)
+++ trunk/matplotlib/CHANGELOG 2009-05-20 20:54:33 UTC (rev 7127)
@@ -1,3 +1,7 @@
+2009-05-20 Add an empty matplotlibrc to the tests/ directory so that running
+ tests will use the default set of rcparams rather than the user's
+ config. - RMM
+
2009-05-19 Axis.grid(): allow use of which='major,minor' to have grid
on major and minor ticks. -ADS
Added: trunk/matplotlib/test/matplotlibrc
===================================================================
--- trunk/matplotlib/test/matplotlibrc (rev 0)
+++ trunk/matplotlib/test/matplotlibrc 2009-05-20 20:54:33 UTC (rev 7127)
@@ -0,0 +1,3 @@
+#This is an empty matplotlibrc so that the tests use the
+#matplotlib default config and not the user's config. This keeps
+#settings like font sizes from causing the image comparison tests to fail.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-05-19 22:26:41
|
Revision: 7126
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7126&view=rev
Author: astraw
Date: 2009-05-19 22:26:33 +0000 (Tue, 19 May 2009)
Log Message:
-----------
support collective.buildbot by enabling buildout support
Added Paths:
-----------
trunk/matplotlib/bootstrap.py
trunk/matplotlib/buildout.cfg
Added: trunk/matplotlib/bootstrap.py
===================================================================
--- trunk/matplotlib/bootstrap.py (rev 0)
+++ trunk/matplotlib/bootstrap.py 2009-05-19 22:26:33 UTC (rev 7126)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Added: trunk/matplotlib/buildout.cfg
===================================================================
--- trunk/matplotlib/buildout.cfg (rev 0)
+++ trunk/matplotlib/buildout.cfg 2009-05-19 22:26:33 UTC (rev 7126)
@@ -0,0 +1,17 @@
+[buildout]
+parts = test python
+develop = .
+eggs = matplotlib
+
+[test]
+recipe = pbp.recipe.noserunner
+eggs =
+ pbp.recipe.noserunner
+ ${buildout:eggs}
+working-directory = ${buildout:directory}
+
+[python]
+recipe = zc.recipe.egg
+interpreter = python
+eggs =
+ ${buildout:eggs}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-05-19 21:29:57
|
Revision: 7125
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7125&view=rev
Author: astraw
Date: 2009-05-19 21:29:46 +0000 (Tue, 19 May 2009)
Log Message:
-----------
add script to consolidate difference images
Added Paths:
-----------
trunk/matplotlib/test/consolidate_diff_images.sh
Added: trunk/matplotlib/test/consolidate_diff_images.sh
===================================================================
--- trunk/matplotlib/test/consolidate_diff_images.sh (rev 0)
+++ trunk/matplotlib/test/consolidate_diff_images.sh 2009-05-19 21:29:46 UTC (rev 7125)
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -e
+
+TARGET_DIR="diff-images"
+rm -rf $TARGET_DIR
+mkdir $TARGET_DIR
+find . -name 'failed-diff-*png' | xargs mv --target-directory=$TARGET_DIR
Property changes on: trunk/matplotlib/test/consolidate_diff_images.sh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-05-19 21:29:41
|
Revision: 7124
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7124&view=rev
Author: astraw
Date: 2009-05-19 21:29:38 +0000 (Tue, 19 May 2009)
Log Message:
-----------
save difference image between failed image and baseline image
Modified Paths:
--------------
trunk/matplotlib/test/mplTest/compare.py
Modified: trunk/matplotlib/test/mplTest/compare.py
===================================================================
--- trunk/matplotlib/test/mplTest/compare.py 2009-05-19 21:29:29 UTC (rev 7123)
+++ trunk/matplotlib/test/mplTest/compare.py 2009-05-19 21:29:38 UTC (rev 7124)
@@ -5,6 +5,8 @@
import math
import operator
+import os
+import numpy as np
#=======================================================================
@@ -112,10 +114,25 @@
if ( (rms / 10000.0) <= tol ):
return None
else:
+ diff_image = os.path.join(os.path.dirname(actual),
+ 'failed-diff-'+os.path.basename(actual))
+ saveDiffImage( expected, actual, diff_image )
+
msg = " Error: Image files did not match.\n" \
" RMS Value: " + str( rms / 10000.0 ) + "\n" \
" Expected:\n " + str( expected ) + "\n" \
" Actual:\n " + str( actual ) + "\n" \
+ " Difference:\n " + str( diff_image ) + "\n" \
" Tolerance: " + str( tol ) + "\n"
return msg
+def saveDiffImage( expected, actual, output ):
+ from PIL import Image
+ expectedImage = np.array(Image.open( expected ).convert("RGB")).astype(np.float)
+ actualImage = np.array(Image.open( actual ).convert("RGB")).astype(np.float)
+ absDiffImage = abs(expectedImage-actualImage)
+ # expand differences in luminance domain
+ absDiffImage *= 10
+ save_image_np = absDiffImage.astype(np.uint8)
+ save_image = Image.fromarray(save_image_np)
+ save_image.save(output)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-05-19 21:29:35
|
Revision: 7123
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7123&view=rev
Author: astraw
Date: 2009-05-19 21:29:29 +0000 (Tue, 19 May 2009)
Log Message:
-----------
Axis.grid(): allow use of which='major,minor' to have grid on major and minor ticks
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axis.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-05-19 21:29:19 UTC (rev 7122)
+++ trunk/matplotlib/CHANGELOG 2009-05-19 21:29:29 UTC (rev 7123)
@@ -1,3 +1,6 @@
+2009-05-19 Axis.grid(): allow use of which='major,minor' to have grid
+ on major and minor ticks. -ADS
+
2009-05-18 Make psd(), csd(), and cohere() wrap properly for complex/two-sided
versions, like specgram() (SF #2791686) - RMM
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py 2009-05-19 21:29:19 UTC (rev 7122)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2009-05-19 21:29:29 UTC (rev 7123)
@@ -953,7 +953,7 @@
if tick is None: continue
tick.gridOn = self._gridOnMinor
if len(kwargs): artist.setp(tick.gridline,**kwargs)
- else:
+ if which.lower().find('major')>=0:
if b is None: self._gridOnMajor = not self._gridOnMajor
else: self._gridOnMajor = b
for tick in self.majorTicks: # don't use get_ticks here!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-05-19 21:29:25
|
Revision: 7122
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7122&view=rev
Author: astraw
Date: 2009-05-19 21:29:19 +0000 (Tue, 19 May 2009)
Log Message:
-----------
convert Axis.grid() docstrings to use complete sentences
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axis.py
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py 2009-05-18 20:50:20 UTC (rev 7121)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2009-05-19 21:29:19 UTC (rev 7122)
@@ -934,12 +934,12 @@
def grid(self, b=None, which='major', **kwargs):
"""
- Set the axis grid on or off; b is a boolean use *which* =
- 'major' | 'minor' to set the grid for major or minor ticks
+ Set the axis grid on or off; b is a boolean. Use *which* =
+ 'major' | 'minor' to set the grid for major or minor ticks.
- if *b* is *None* and len(kwargs)==0, toggle the grid state. If
+ If *b* is *None* and len(kwargs)==0, toggle the grid state. If
*kwargs* are supplied, it is assumed you want the grid on and *b*
- will be set to True
+ will be set to True.
*kwargs* are used to set the line properties of the grids, eg,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ry...@us...> - 2009-05-18 20:50:27
|
Revision: 7121
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7121&view=rev
Author: ryanmay
Date: 2009-05-18 20:50:20 +0000 (Mon, 18 May 2009)
Log Message:
-----------
Move code for wrapping negative frequencies from specgram() into _spectral_helper(), so that psd(), csd(), and cohere() can benefit from this functionality as well. While this changes API a little, this is much more sensible behavior.
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/api/api_changes.rst
trunk/matplotlib/lib/matplotlib/mlab.py
Added Paths:
-----------
trunk/matplotlib/examples/pylab_examples/psd_demo_complex.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-05-18 19:19:33 UTC (rev 7120)
+++ trunk/matplotlib/CHANGELOG 2009-05-18 20:50:20 UTC (rev 7121)
@@ -1,4 +1,7 @@
-2009-05-18 Fix the linespacing bug of multiline text (#1239682). See
+2009-05-18 Make psd(), csd(), and cohere() wrap properly for complex/two-sided
+ versions, like specgram() (SF #2791686) - RMM
+
+2009-05-18 Fix the linespacing bug of multiline text (#1239682). See
examples/pylab_examples/multiline.py -JJL
2009-05-18 Add *annotation_clip* attr. for text.Annotation class.
Modified: trunk/matplotlib/doc/api/api_changes.rst
===================================================================
--- trunk/matplotlib/doc/api/api_changes.rst 2009-05-18 19:19:33 UTC (rev 7120)
+++ trunk/matplotlib/doc/api/api_changes.rst 2009-05-18 20:50:20 UTC (rev 7121)
@@ -19,6 +19,12 @@
Changes for 0.98.x
==================
+* psd(), csd(), and cohere() will now automatically wrap negative
+ frequency components to the beginning of the returned arrays.
+ This is much more sensible behavior and makes them consistent
+ with specgram(). The previous behavior was more of an oversight
+ than a design decision.
+
* Added new keyword parameters *nonposx*, *nonposy* to
:class:`matplotlib.axes.Axes` methods that set log scale
parameters. The default is still to mask out non-positive
Added: trunk/matplotlib/examples/pylab_examples/psd_demo_complex.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/psd_demo_complex.py (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/psd_demo_complex.py 2009-05-18 20:50:20 UTC (rev 7121)
@@ -0,0 +1,38 @@
+#This is a ported version of a Matlab example from the signal processing
+#toolbox that showed some difference at one time between Matplotlib's and
+#MatLab's scaling of the PSD. This differs from psd_demo3.py in that
+#this uses a complex signal, so we can see that complex PSD's work properly
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.mlab as mlab
+
+fs = 1000
+t = np.linspace(0, 0.3, 301)
+A = np.array([2, 8]).reshape(-1, 1)
+f = np.array([150, 140]).reshape(-1, 1)
+xn = (A * np.exp(2j * np.pi * f * t)).sum(axis=0) + 5 * np.random.randn(*t.shape)
+
+yticks = np.arange(-50, 30, 10)
+xticks = np.arange(-500,550,100)
+plt.subplots_adjust(hspace=0.45, wspace=0.3)
+ax = plt.subplot(1, 2, 1)
+
+plt.psd(xn, NFFT=301, Fs=fs, window=mlab.window_none, pad_to=1024,
+ scale_by_freq=True)
+plt.title('Periodogram')
+plt.yticks(yticks)
+plt.xticks(xticks)
+plt.grid(True)
+plt.xlim(-500, 500)
+
+plt.subplot(1, 2, 2, sharex=ax, sharey=ax)
+plt.psd(xn, NFFT=150, Fs=fs, window=mlab.window_none, noverlap=75, pad_to=512,
+ scale_by_freq=True)
+plt.title('Welch')
+plt.xticks(xticks)
+plt.yticks(yticks)
+plt.ylabel('')
+plt.grid(True)
+plt.xlim(-500, 500)
+
+plt.show()
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2009-05-18 19:19:33 UTC (rev 7120)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2009-05-18 20:50:20 UTC (rev 7121)
@@ -327,6 +327,11 @@
t = 1./Fs * (ind + NFFT / 2.)
freqs = float(Fs) / pad_to * np.arange(numFreqs)
+ if (np.iscomplexobj(x) and sides == 'default') or sides == 'twosided':
+ # center the frequency range at zero
+ freqs = np.concatenate((freqs[numFreqs//2:] - Fs, freqs[:numFreqs//2]))
+ Pxy = np.concatenate((Pxy[numFreqs//2:, :], Pxy[:numFreqs//2, :]), 0)
+
return Pxy, freqs, t
#Split out these keyword docs so that they can be used elsewhere
@@ -485,11 +490,6 @@
noverlap, pad_to, sides, scale_by_freq)
Pxx = Pxx.real #Needed since helper implements generically
- if (np.iscomplexobj(x) and sides == 'default') or sides == 'twosided':
- # center the frequency range at zero
- freqs = np.concatenate((freqs[NFFT/2:]-Fs,freqs[:NFFT/2]))
- Pxx = np.concatenate((Pxx[NFFT/2:,:],Pxx[:NFFT/2,:]),0)
-
return Pxx, freqs, t
specgram.__doc__ = specgram.__doc__ % kwdocd
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-05-18 19:19:43
|
Revision: 7120
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7120&view=rev
Author: leejjoon
Date: 2009-05-18 19:19:33 +0000 (Mon, 18 May 2009)
Log Message:
-----------
Fix the linespacing bug of multiline text (#1239682)
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/pylab_examples/multiline.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-05-18 17:25:46 UTC (rev 7119)
+++ trunk/matplotlib/CHANGELOG 2009-05-18 19:19:33 UTC (rev 7120)
@@ -1,3 +1,6 @@
+2009-05-18 Fix the linespacing bug of multiline text (#1239682). See
+ examples/pylab_examples/multiline.py -JJL
+
2009-05-18 Add *annotation_clip* attr. for text.Annotation class.
If True, annotation is only drawn when the annotated point is
inside the axes area. -JJL
Modified: trunk/matplotlib/examples/pylab_examples/multiline.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/multiline.py 2009-05-18 17:25:46 UTC (rev 7119)
+++ trunk/matplotlib/examples/pylab_examples/multiline.py 2009-05-18 19:19:33 UTC (rev 7120)
@@ -1,15 +1,46 @@
#!/usr/bin/env python
from pylab import *
+#from matplotlib.pyplot import *
+#from numpy import arange
-plot(arange(10))
-xlabel('this is a xlabel\n(with newlines!)')
-ylabel('this is vertical\ntest', multialignment='center')
-#ylabel('this is another!')
-text(2, 7,'this is\nyet another test',
- rotation=45,
- horizontalalignment = 'center',
- verticalalignment = 'top',
- multialignment = 'center')
+if 1:
+ figure(figsize=(7, 4))
+ ax = subplot(121)
+ ax.set_aspect(1)
+ plot(arange(10))
+ xlabel('this is a xlabel\n(with newlines!)')
+ ylabel('this is vertical\ntest', multialignment='center')
+ #ylabel('this is another!')
+ text(2, 7,'this is\nyet another test',
+ rotation=45,
+ horizontalalignment = 'center',
+ verticalalignment = 'top',
+ multialignment = 'center')
-grid(True)
+ grid(True)
+
+
+
+ subplot(122)
+
+ text(0.29, 0.7, "Mat\nTTp\n123", size=18,
+ va="baseline", ha="right", multialignment="left",
+ bbox=dict(fc="none"))
+
+ text(0.34, 0.7, "Mag\nTTT\n123", size=18,
+ va="baseline", ha="left", multialignment="left",
+ bbox=dict(fc="none"))
+
+ text(0.95, 0.7, "Mag\nTTT$^{A^A}$\n123", size=18,
+ va="baseline", ha="right", multialignment="left",
+ bbox=dict(fc="none"))
+
+ xticks([0.2, 0.4, 0.6, 0.8, 1.],
+ ["Jan\n2009","Feb\n2009","Mar\n2009", "Apr\n2009", "May\n2009"])
+
+ axhline(0.7)
+ title("test line spacing for multiline text")
+
+subplots_adjust(bottom=0.25, top=0.8)
+draw()
show()
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2009-05-18 17:25:46 UTC (rev 7119)
+++ trunk/matplotlib/lib/matplotlib/text.py 2009-05-18 19:19:33 UTC (rev 7120)
@@ -8,15 +8,15 @@
from matplotlib import cbook
from matplotlib import rcParams
-import artist
-from artist import Artist
-from cbook import is_string_like, maxdict
-from font_manager import FontProperties
-from patches import bbox_artist, YAArrow, FancyBboxPatch, \
+import matplotlib.artist as artist
+from matplotlib.artist import Artist
+from matplotlib.cbook import is_string_like, maxdict
+from matplotlib.font_manager import FontProperties
+from matplotlib.patches import bbox_artist, YAArrow, FancyBboxPatch, \
FancyArrowPatch, Rectangle
-import transforms as mtransforms
-from transforms import Affine2D, Bbox
-from lines import Line2D
+import matplotlib.transforms as mtransforms
+from matplotlib.transforms import Affine2D, Bbox
+from matplotlib.lines import Line2D
import matplotlib.nxutils as nxutils
@@ -227,6 +227,11 @@
self._linespacing = other._linespacing
def _get_layout(self, renderer):
+ """
+ return the extent (bbox) of the text together with
+ multile-alignment information. Note that it returns a extent
+ of a rotated text when necessary.
+ """
key = self.get_prop_tup()
if key in self.cached: return self.cached[key]
@@ -242,9 +247,9 @@
# Find full vertical extent of font,
# including ascenders and descenders:
- tmp, heightt, bl = renderer.get_text_width_height_descent(
+ tmp, lp_h, lp_bl = renderer.get_text_width_height_descent(
'lp', self._fontproperties, ismath=False)
- offsety = heightt * self._linespacing
+ offsety = lp_h * self._linespacing
baseline = None
for i, line in enumerate(lines):
@@ -254,8 +259,22 @@
if baseline is None:
baseline = h - d
whs[i] = w, h
- horizLayout[i] = thisx, thisy, w, h
- thisy -= offsety
+
+ # For general multiline text, we will have a fixed spacing
+ # between the "baseline" of the upper line and "top" of
+ # the lower line (instead of the "bottom" of the upper
+ # line and "top" of the lower line)
+
+ # For multiline text, increase the line spacing when the
+ # text net-height(excluding baseline) is larger than that
+ # of a "l" (e.g., use of superscripts), which seems
+ # what TeX does.
+
+ d_yoffset = max(0, (h-d)-(lp_h-lp_bl))
+
+ horizLayout[i] = thisx, thisy-(d + d_yoffset), \
+ w, h
+ thisy -= offsety + d_yoffset
width = max(width, w)
ymin = horizLayout[-1][1]
@@ -1688,3 +1707,4 @@
artist.kwdocd['Annotation'] = Annotation.__init__.__doc__
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-05-18 17:25:55
|
Revision: 7119
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7119&view=rev
Author: leejjoon
Date: 2009-05-18 17:25:46 +0000 (Mon, 18 May 2009)
Log Message:
-----------
Add *annotation_clip* attr. for text.Annotation class
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-05-18 01:11:49 UTC (rev 7118)
+++ trunk/matplotlib/CHANGELOG 2009-05-18 17:25:46 UTC (rev 7119)
@@ -1,3 +1,7 @@
+2009-05-18 Add *annotation_clip* attr. for text.Annotation class.
+ If True, annotation is only drawn when the annotated point is
+ inside the axes area. -JJL
+
2009-05-17 Fix bug(#2749174) that some properties of minor ticks are
not conserved -JJL
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-05-18 01:11:49 UTC (rev 7118)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-05-18 17:25:46 UTC (rev 7119)
@@ -2657,6 +2657,15 @@
return self.patch.contains(mouseevent)
+ def contains_point(self, point):
+ """
+ Returns True if the point (tuple of x,y) is inside the axes
+ (the area defined by the its patch). A pixel coordinate is
+ required.
+
+ """
+ return self.patch.contains_point(point)
+
def pick(self, *args):
"""
call signature::
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-05-18 01:11:49 UTC (rev 7118)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-05-18 17:25:46 UTC (rev 7119)
@@ -81,6 +81,14 @@
(mouseevent.x, mouseevent.y), self.get_transform())
return inside, {}
+ def contains_point(self, point):
+ """
+ Returns *True* if the given point is inside the path
+ (transformed with its transform attribute).
+ """
+ return self.get_path().contains_point(point,
+ self.get_transform())
+
def update_from(self, other):
"""
Updates this :class:`Patch` from the properties of *other*.
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2009-05-18 01:11:49 UTC (rev 7118)
+++ trunk/matplotlib/lib/matplotlib/text.py 2009-05-18 17:25:46 UTC (rev 7119)
@@ -1408,6 +1408,8 @@
else:
self.arrow_patch = None
+ # if True, draw annotation only if self.xy is inside the axes
+ self._annotation_clip = None
__init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
@@ -1525,15 +1527,44 @@
trans = self.axes.transAxes
return trans.transform_point((x, y))
+ def set_annotation_clip(self, b):
+ """
+ set *annotation_clip* attribute.
+ * True : the annotation will only be drawn when self.xy is inside the axes.
+ * False : the annotation will always be drawn regardless of its position.
+ * None : the self.xy will be checked only if *xycoords* is "data"
+ """
+ self._annotation_clip = b
+
+ def get_annotation_clip(self):
+ """
+ Return *annotation_clip* attribute.
+ See :meth:`set_annotation_clip` for the meaning of return values.
+ """
+ return self._annotation_clip
+
+
def update_positions(self, renderer):
+ "Update the pixel positions of the annotated point and the text."
+ xy_pixel = self._get_position_xy(renderer)
+ self._update_position_xytext(renderer, xy_pixel)
+
+ def _get_position_xy(self, renderer):
+ "Return the pixel position of the the annotated point."
+ x, y = self.xy
+ return self._get_xy(x, y, self.xycoords)
+
+
+ def _update_position_xytext(self, renderer, xy_pixel):
+ "Update the pixel positions of the annotation text and the arrow patch."
+
x, y = self.xytext
self._x, self._y = self._get_xy(x, y, self.textcoords)
- x, y = self.xy
- x, y = self._get_xy(x, y, self.xycoords)
+ x, y = xy_pixel
ox0, oy0 = self._x, self._y
ox1, oy1 = x, y
@@ -1609,6 +1640,22 @@
self.arrow.set_clip_box(self.get_clip_box())
+
+ def _check_xy(self, renderer, xy_pixel):
+ """
+ given the xy pixel coordinate, check if the annotation need to
+ be drawn.
+ """
+
+ b = self.get_annotation_clip()
+ if b or (b is None and self.xycoords == "data"):
+ # check if self.xy is inside the axes.
+ if not self.axes.contains_point(xy_pixel):
+ return False
+
+ return True
+
+
def draw(self, renderer):
"""
Draw the :class:`Annotation` object to the given *renderer*.
@@ -1618,7 +1665,13 @@
self._renderer = renderer
if not self.get_visible(): return
- self.update_positions(renderer)
+ xy_pixel = self._get_position_xy(renderer)
+
+ if not self._check_xy(renderer, xy_pixel):
+ return
+
+ self._update_position_xytext(renderer, xy_pixel)
+
self.update_bbox_position_size(renderer)
if self.arrow is not None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-05-18 01:11:58
|
Revision: 7118
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7118&view=rev
Author: jdh2358
Date: 2009-05-18 01:11:49 +0000 (Mon, 18 May 2009)
Log Message:
-----------
added fill_betweenx demo -- how did this get dropped from the original patch commit?
Added Paths:
-----------
trunk/matplotlib/examples/pylab_examples/fill_betweenx.py
Added: trunk/matplotlib/examples/pylab_examples/fill_betweenx.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/fill_betweenx.py (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/fill_betweenx.py 2009-05-18 01:11:49 UTC (rev 7118)
@@ -0,0 +1,50 @@
+import matplotlib.mlab as mlab
+from matplotlib.pyplot import figure, show
+import numpy as np
+
+## Copy of fill_between.py but using fill_betweenx() instead.
+
+x = np.arange(0.0, 2, 0.01)
+y1 = np.sin(2*np.pi*x)
+y2 = 1.2*np.sin(4*np.pi*x)
+
+fig = figure()
+ax1 = fig.add_subplot(311)
+ax2 = fig.add_subplot(312, sharex=ax1)
+ax3 = fig.add_subplot(313, sharex=ax1)
+
+ax1.fill_betweenx(x, 0, y1)
+ax1.set_ylabel('between y1 and 0')
+
+ax2.fill_betweenx(x, y1, 1)
+ax2.set_ylabel('between y1 and 1')
+
+ax3.fill_betweenx(x, y1, y2)
+ax3.set_ylabel('between y1 and y2')
+ax3.set_xlabel('x')
+
+# now fill between y1 and y2 where a logical condition is met. Note
+# this is different than calling
+# fill_between(x[where], y1[where],y2[where]
+# because of edge effects over multiple contiguous regions.
+fig = figure()
+ax = fig.add_subplot(211)
+ax.plot(y1, x, y2, x, color='black')
+ax.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green')
+ax.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red')
+ax.set_title('fill between where')
+
+# Test support for masked arrays.
+y2 = np.ma.masked_greater(y2, 1.0)
+ax1 = fig.add_subplot(212, sharex=ax)
+ax1.plot(y1, x, y2, x, color='black')
+ax1.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green')
+ax1.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red')
+ax1.set_title('Now regions with y2 > 1 are masked')
+
+# This example illustrates a problem; because of the data
+# gridding, there are undesired unfilled triangles at the crossover
+# points. A brute-force solution would be to interpolate all
+# arrays to a very fine grid before plotting.
+
+show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-05-18 00:57:10
|
Revision: 7117
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7117&view=rev
Author: jdh2358
Date: 2009-05-18 00:57:01 +0000 (Mon, 18 May 2009)
Log Message:
-----------
added community choice to mpl site
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/indexsidebar.html
Modified: trunk/matplotlib/doc/_templates/indexsidebar.html
===================================================================
--- trunk/matplotlib/doc/_templates/indexsidebar.html 2009-05-17 22:13:22 UTC (rev 7116)
+++ trunk/matplotlib/doc/_templates/indexsidebar.html 2009-05-18 00:57:01 UTC (rev 7117)
@@ -1,6 +1,10 @@
<h3>Download</h3>
<p>Current version: <b>{{ version }}</b></p>
+<p>Nominate matplotlib for a community choice award!
+<a href="http://sourceforge.net/community/cca09/nominate/?project_name=matplotlib&project_url=http://sourceforge.net/projects/matplotlib/"><img src="http://sourceforge.net/images/cca/cca_nominate.png" border="0"/></a>
+</p>
+
<p>Download matplotlib from the
sourceforge <a href="http://sourceforge.net/projects/matplotlib">project</a>
page (but first take a look at the <a href="{{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-05-17 22:13:30
|
Revision: 7116
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7116&view=rev
Author: leejjoon
Date: 2009-05-17 22:13:22 +0000 (Sun, 17 May 2009)
Log Message:
-----------
Merged revisions 7115 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r7115 | leejjoon | 2009-05-17 18:04:38 -0400 (Sun, 17 May 2009) | 2 lines
Fix bug(#2749174) that some properties of minor ticks are not conserved.
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axis.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-7110
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7115
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-05-17 22:04:38 UTC (rev 7115)
+++ trunk/matplotlib/CHANGELOG 2009-05-17 22:13:22 UTC (rev 7116)
@@ -1,3 +1,6 @@
+2009-05-17 Fix bug(#2749174) that some properties of minor ticks are
+ not conserved -JJL
+
2009-05-17 applied Michiel's sf patch 2790638 to turn off gtk event
loop in setupext for pygtk>=2.15.10 - JDH
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py 2009-05-17 22:04:38 UTC (rev 7115)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2009-05-17 22:13:22 UTC (rev 7116)
@@ -1325,8 +1325,12 @@
assert position in ('top', 'bottom', 'both', 'default', 'none')
- ticks = list( self.get_major_ticks() ) # a copy
- ticks.extend( self.get_minor_ticks() )
+ # The first ticks of major & minor ticks should always be
+ # included, otherwise, the information can be lost. Thus, use
+ # majorTicks instead of get_major_ticks() which may return
+ # empty list.
+ ticks = list( self.majorTicks ) # a copy
+ ticks.extend( self.minorTicks )
if position == 'top':
for t in ticks:
@@ -1566,8 +1570,12 @@
"""
assert position in ('left', 'right', 'both', 'default', 'none')
- ticks = list( self.get_major_ticks() ) # a copy
- ticks.extend( self.get_minor_ticks() )
+ # The first ticks of major & minor ticks should always be
+ # included, otherwise, the information can be lost. Thus, use
+ # majorTicks instead of get_major_ticks() which may return
+ # empty list.
+ ticks = list( self.majorTicks ) # a copy
+ ticks.extend( self.minorTicks )
if position == 'right':
self.set_offset_position('right')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-05-17 22:04:49
|
Revision: 7115
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7115&view=rev
Author: leejjoon
Date: 2009-05-17 22:04:38 +0000 (Sun, 17 May 2009)
Log Message:
-----------
Fix bug(#2749174) that some properties of minor ticks are not conserved.
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/axis.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-05-17 21:36:34 UTC (rev 7114)
+++ branches/v0_98_5_maint/CHANGELOG 2009-05-17 22:04:38 UTC (rev 7115)
@@ -1,3 +1,6 @@
+2009-05-17 Fix bug(#2749174) that some properties of minor ticks are
+ not conserved -JJL
+
======================================================================
2008-05-17 Release 0.98.5.3 at r7107
Modified: branches/v0_98_5_maint/lib/matplotlib/axis.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/axis.py 2009-05-17 21:36:34 UTC (rev 7114)
+++ branches/v0_98_5_maint/lib/matplotlib/axis.py 2009-05-17 22:04:38 UTC (rev 7115)
@@ -1273,8 +1273,12 @@
assert position in ('top', 'bottom', 'both', 'default', 'none')
- ticks = list( self.get_major_ticks() ) # a copy
- ticks.extend( self.get_minor_ticks() )
+ # The first ticks of major & minor ticks should always be
+ # included, otherwise, the information can be lost. Thus, use
+ # majorTicks instead of get_major_ticks() which may return
+ # empty list.
+ ticks = list( self.majorTicks ) # a copy
+ ticks.extend( self.minorTicks )
if position == 'top':
for t in ticks:
@@ -1514,8 +1518,12 @@
"""
assert position in ('left', 'right', 'both', 'default', 'none')
- ticks = list( self.get_major_ticks() ) # a copy
- ticks.extend( self.get_minor_ticks() )
+ # The first ticks of major & minor ticks should always be
+ # included, otherwise, the information can be lost. Thus, use
+ # majorTicks instead of get_major_ticks() which may return
+ # empty list.
+ ticks = list( self.majorTicks ) # a copy
+ ticks.extend( self.minorTicks )
if position == 'right':
self.set_offset_position('right')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-05-17 21:36:42
|
Revision: 7114
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7114&view=rev
Author: leejjoon
Date: 2009-05-17 21:36:34 +0000 (Sun, 17 May 2009)
Log Message:
-----------
a warning won't be issued for semilog axes if aspect="auto"
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-05-17 18:00:10 UTC (rev 7113)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-05-17 21:36:34 UTC (rev 7114)
@@ -1137,10 +1137,11 @@
aspect_scale_mode = "log"
elif (xscale == "linear" and yscale == "log") or \
(xscale == "log" and yscale == "linear"):
- warnings.warn(
- 'aspect is not supported for Axes with xscale=%s, yscale=%s' \
- % (xscale, yscale))
- aspect = "auto"
+ if aspect is not "auto":
+ warnings.warn(
+ 'aspect is not supported for Axes with xscale=%s, yscale=%s' \
+ % (xscale, yscale))
+ aspect = "auto"
else: # some custom projections have their own scales.
pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-05-17 18:00:11
|
Revision: 7113
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7113&view=rev
Author: jdh2358
Date: 2009-05-17 18:00:10 +0000 (Sun, 17 May 2009)
Log Message:
-----------
applied Michiel's sf patch 2790638 to turn off gtk event for setupext
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/setupext.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-05-17 15:08:07 UTC (rev 7112)
+++ trunk/matplotlib/CHANGELOG 2009-05-17 18:00:10 UTC (rev 7113)
@@ -1,6 +1,10 @@
-2009-05-19 applied Michiel's sf patch 2792742 to speed up Cairo and
- macosx collections; speedups can be 20x
+2009-05-17 applied Michiel's sf patch 2790638 to turn off gtk event
+ loop in setupext for pygtk>=2.15.10 - JDH
+2009-05-17 applied Michiel's sf patch 2792742 to speed up Cairo and
+ macosx collections; speedups can be 20x. Also fixes some
+ bugs in which gc got into inconsistent state
+
======================================================================
2008-05-17 Release 0.98.5.3 at r7107 from the branch - JDH
Modified: trunk/matplotlib/setupext.py
===================================================================
--- trunk/matplotlib/setupext.py 2009-05-17 15:08:07 UTC (rev 7112)
+++ trunk/matplotlib/setupext.py 2009-05-17 18:00:10 UTC (rev 7113)
@@ -595,6 +595,13 @@
if explanation is not None:
print_message(explanation)
+ # Switch off the event loop for PyGTK >= 2.15.0
+ if gotit:
+ try:
+ gtk.set_interactive(False)
+ except AttributeError: # PyGTK < 2.15.0
+ pass
+
return gotit
def add_pygtk_flags(module):
@@ -842,6 +849,7 @@
tk.withdraw()
tcl_lib_dir = str(tk.getvar('tcl_library'))
tk_lib_dir = str(tk.getvar('tk_library'))
+ tk.destroy()
# Save directories and version string to cache
TCL_TK_CACHE = tcl_lib_dir, tk_lib_dir, str(Tkinter.TkVersion)[:3]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|