SF.net SVN: matplotlib:[7079] trunk/matplotlib

2009-05-04 Thread jdh2358
Revision: 7079
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7079&view=rev
Author:   jdh2358
Date: 2009-05-04 18:19:18 + (Mon, 04 May 2009)

Log Message:
---
added sf patch 2786759 for fill_betweenx

Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/boilerplate.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/pyplot.py

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2009-05-03 00:09:06 UTC (rev 7078)
+++ trunk/matplotlib/CHANGELOG  2009-05-04 18:19:18 UTC (rev 7079)
@@ -1,7 +1,10 @@
 ==
+2009-05-04 Added TJ's fill_betweenx patch - JDH
+
 2009-05-02 Added options to plotfile based on question from
Joseph Smidt and patch by Matthias Michler. - EF
 
+
 2009-05-01 Changed add_artist and similar Axes methods to
return their argument. - EF
 

Modified: trunk/matplotlib/boilerplate.py
===
--- trunk/matplotlib/boilerplate.py 2009-05-03 00:09:06 UTC (rev 7078)
+++ trunk/matplotlib/boilerplate.py 2009-05-04 18:19:18 UTC (rev 7079)
@@ -65,6 +65,7 @@
 'errorbar',
 'fill',
 'fill_between',
+'fill_betweenx',
 'hexbin',
 'hist',
 'hlines',

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-05-03 00:09:06 UTC (rev 
7078)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-05-04 18:19:18 UTC (rev 
7079)
@@ -5826,10 +5826,10 @@
   an N length np array of the x data
 
 *y1*
-  an N length scalar or np array of the x data
+  an N length scalar or np array of the y data
 
 *y2*
-  an N length scalar or np array of the x data
+  an N length scalar or np array of the y data
 
 *where*
if None, default to fill between everywhere.  If not None,
@@ -5844,6 +5844,12 @@
 %(PolyCollection)s
 
 .. plot:: mpl_examples/pylab_examples/fill_between.py
+
+.. seealso::
+
+:meth:`fill_betweenx`
+for filling between two sets of x-values
+
 """
 # Handle united data, such as dates
 self._process_unit_info(xdata=x, ydata=y1, kwargs=kwargs)
@@ -5913,6 +5919,113 @@
 return collection
 fill_between.__doc__ = cbook.dedent(fill_between.__doc__) % martist.kwdocd
 
+def fill_betweenx(self, y, x1, x2=0, where=None, **kwargs):
+"""
+call signature::
+
+  fill_between(y, x1, x2=0, where=None, **kwargs)
+
+Create a :class:`~matplotlib.collections.PolyCollection`
+filling the regions between *x1* and *x2* where
+``where==True``
+
+*y*
+  an N length np array of the y data
+
+*x1*
+  an N length scalar or np array of the x data
+
+*x2*
+  an N length scalar or np array of the x data
+
+*where*
+   if None, default to fill between everywhere.  If not None,
+   it is a a N length numpy boolean array and the fill will
+   only happen over the regions where ``where==True``
+
+*kwargs*
+  keyword args passed on to the :class:`PolyCollection`
+
+kwargs control the Polygon properties:
+
+%(PolyCollection)s
+
+.. plot:: mpl_examples/pylab_examples/fill_betweenx.py
+
+.. seealso::
+
+:meth:`fill_between`
+for filling between two sets of y-values
+
+"""
+# Handle united data, such as dates
+self._process_unit_info(ydata=y, xdata=x1, kwargs=kwargs)
+self._process_unit_info(xdata=x2)
+
+# Convert the arrays so we can work with them
+y = np.asanyarray(self.convert_yunits(y))
+x1 = np.asanyarray(self.convert_xunits(x1))
+x2 = np.asanyarray(self.convert_xunits(x2))
+
+if x1.ndim == 0:
+x1 = np.ones_like(y)*x1
+if x2.ndim == 0:
+x2 = np.ones_like(y)*x2
+
+if where is None:
+where = np.ones(len(y), np.bool)
+else:
+where = np.asarray(where, np.bool)
+
+if not (y.shape == x1.shape == x2.shape == where.shape):
+raise ValueError("Argument dimensions are incompatible")
+
+mask = reduce(ma.mask_or,
+[ma.getmask(y), ma.getmask(x1), ma.getmask(x2)])
+if mask is not ma.nomask:
+where &= ~mask
+
+polys = []
+for ind0, ind1 in mlab.contiguous_regions(where):
+theseverts = []
+yslice = y[ind0:ind1]
+x1slice = x1[ind0:ind1]
+x2slice = x2[ind0:ind1]
+
+if not len(yslice):
+continue
+
+N = len(yslice)
+

SF.net SVN: matplotlib:[7080] branches/v0_98_5_maint/lib/matplotlib/ticker. py

2009-05-04 Thread mdboom
Revision: 7080
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7080&view=rev
Author:   mdboom
Date: 2009-05-04 19:05:38 + (Mon, 04 May 2009)

Log Message:
---
[2723470] UnboundLocalError in ticker.py

Modified Paths:
--
branches/v0_98_5_maint/lib/matplotlib/ticker.py

Modified: branches/v0_98_5_maint/lib/matplotlib/ticker.py
===
--- branches/v0_98_5_maint/lib/matplotlib/ticker.py 2009-05-04 18:19:18 UTC 
(rev 7079)
+++ branches/v0_98_5_maint/lib/matplotlib/ticker.py 2009-05-04 19:05:38 UTC 
(rev 7080)
@@ -930,6 +930,8 @@
 vmax -= offset
 raw_step = (vmax-vmin)/nbins
 scaled_raw_step = raw_step/scale
+best_vmax = vmax
+best_vmin = vmin
 
 for step in self._steps:
 if step < scaled_raw_step:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7081] trunk/matplotlib

2009-05-04 Thread mdboom
Revision: 7081
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7081&view=rev
Author:   mdboom
Date: 2009-05-04 19:07:43 + (Mon, 04 May 2009)

Log Message:
---
Merged revisions 7080 via svnmerge from 
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint


  r7080 | mdboom | 2009-05-04 15:05:38 -0400 (Mon, 04 May 2009) | 2 lines
  
  [2723470] UnboundLocalError in ticker.py


Modified Paths:
--
trunk/matplotlib/lib/matplotlib/ticker.py

Property Changed:

trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py


Property changes on: trunk/matplotlib
___
Modified: svnmerge-integrated
   - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7072
   + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7080
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,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072
   + /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,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080


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,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072
   + 
/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,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080


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,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072
   + /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,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080


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,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072
   + /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,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,70

SF.net SVN: matplotlib:[7082] branches/v0_98_5_maint

2009-05-04 Thread leejjoon
Revision: 7082
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7082&view=rev
Author:   leejjoon
Date: 2009-05-04 20:05:57 + (Mon, 04 May 2009)

Log Message:
---
Fix bug that Text.Annotation is still drawn while set to not visible

Modified Paths:
--
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/text.py

Modified: branches/v0_98_5_maint/CHANGELOG
===
--- branches/v0_98_5_maint/CHANGELOG2009-05-04 19:07:43 UTC (rev 7081)
+++ branches/v0_98_5_maint/CHANGELOG2009-05-04 20:05:57 UTC (rev 7082)
@@ -1,4 +1,7 @@
 ==
+2009-05-04 Fix bug that Text.Annotation is still drawn while set to 
+   not visible.-JJL
+
 2008-04-12 Release 0.98.5.3 at r7038
 
 2009-04-06 The pdf backend now escapes newlines and linefeeds in strings.

Modified: branches/v0_98_5_maint/lib/matplotlib/text.py
===
--- branches/v0_98_5_maint/lib/matplotlib/text.py   2009-05-04 19:07:43 UTC 
(rev 7081)
+++ branches/v0_98_5_maint/lib/matplotlib/text.py   2009-05-04 20:05:57 UTC 
(rev 7082)
@@ -1602,6 +1602,11 @@
 """
 Draw the :class:`Annotation` object to the given *renderer*.
 """
+
+if renderer is not None:
+self._renderer = renderer
+if not self.get_visible(): return
+
 self.update_positions(renderer)
 self.update_bbox_position_size(renderer)
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7083] trunk/matplotlib

2009-05-04 Thread leejjoon
Revision: 7083
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7083&view=rev
Author:   leejjoon
Date: 2009-05-04 20:14:40 + (Mon, 04 May 2009)

Log Message:
---
Merged revisions 7082 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint


  r7082 | leejjoon | 2009-05-04 16:05:57 -0400 (Mon, 04 May 2009) | 2 lines
  
  Fix bug that Text.Annotation is still drawn while set to not visible


Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/text.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-7080
   + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7082

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2009-05-04 20:05:57 UTC (rev 7082)
+++ trunk/matplotlib/CHANGELOG  2009-05-04 20:14:40 UTC (rev 7083)
@@ -1,4 +1,7 @@
 ==
+2009-05-04 Fix bug that Text.Annotation is still drawn while set to 
+   not visible.-JJL
+
 2009-05-04 Added TJ's fill_betweenx patch - JDH
 
 2009-05-02 Added options to plotfile based on question from

Modified: trunk/matplotlib/lib/matplotlib/text.py
===
--- trunk/matplotlib/lib/matplotlib/text.py 2009-05-04 20:05:57 UTC (rev 
7082)
+++ trunk/matplotlib/lib/matplotlib/text.py 2009-05-04 20:14:40 UTC (rev 
7083)
@@ -1612,6 +1612,11 @@
 """
 Draw the :class:`Annotation` object to the given *renderer*.
 """
+
+if renderer is not None:
+self._renderer = renderer
+if not self.get_visible(): return
+
 self.update_positions(renderer)
 self.update_bbox_position_size(renderer)
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7084] trunk/matplotlib/lib

2009-05-04 Thread leejjoon
Revision: 7084
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7084&view=rev
Author:   leejjoon
Date: 2009-05-05 03:27:48 + (Tue, 05 May 2009)

Log Message:
---
Better support for tick (tick label) color handling in axes_grid.axisline

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/text.py
trunk/matplotlib/lib/mpl_toolkits/axes_grid/axislines.py
trunk/matplotlib/lib/mpl_toolkits/axes_grid/inset_locator.py
trunk/matplotlib/lib/mpl_toolkits/axes_grid/parasite_axes.py

Added Paths:
---
trunk/matplotlib/lib/mpl_toolkits/axes_grid/ChangeLog

Modified: trunk/matplotlib/lib/matplotlib/text.py
===
--- trunk/matplotlib/lib/matplotlib/text.py 2009-05-04 20:14:40 UTC (rev 
7083)
+++ trunk/matplotlib/lib/matplotlib/text.py 2009-05-05 03:27:48 UTC (rev 
7084)
@@ -235,7 +235,7 @@
 thisx, thisy  = 0.0, 0.0
 xmin, ymin= 0.0, 0.0
 width, height = 0.0, 0.0
-lines = self._text.split('\n')
+lines = self.get_text().split('\n')
 
 whs = np.zeros((len(lines), 2))
 horizLayout = np.zeros((len(lines), 4))
@@ -406,10 +406,10 @@
 props = props.copy() # don't want to alter the pad externally
 pad = props.pop('pad', 4)
 pad = renderer.points_to_pixels(pad)
-if self._text == "":
+if self.get_text() == "":
 self.arrow_patch.set_patchA(None)
 return
-
+
 bbox = self.get_window_extent(renderer)
 l,b,w,h = bbox.bounds
 l-=pad/2.
@@ -451,7 +451,7 @@
 if renderer is not None:
 self._renderer = renderer
 if not self.get_visible(): return
-if self._text=='': return
+if self.get_text()=='': return
 
 renderer.open_group('text', self.get_gid())
 
@@ -472,8 +472,8 @@
 self._draw_bbox(renderer, posx, posy)
 
 gc = renderer.new_gc()
-gc.set_foreground(self._color)
-gc.set_alpha(self._alpha)
+gc.set_foreground(self.get_color())
+gc.set_alpha(self.get_alpha())
 gc.set_url(self._url)
 if self.get_clip_on():
 gc.set_clip_rectangle(self.clipbox)
@@ -604,7 +604,7 @@
 need to know if the text has changed.
 """
 x, y = self.get_position()
-return (x, y, self._text, self._color,
+return (x, y, self.get_text(), self._color,
 self._verticalalignment, self._horizontalalignment,
 hash(self._fontproperties), self._rotation,
 self.figure.dpi, id(self._renderer),
@@ -650,7 +650,7 @@
 if dpi is not None:
 dpi_orig = self.figure.dpi
 self.figure.dpi = dpi
-if self._text == '':
+if self.get_text() == '':
 tx, ty = self._get_xy_display()
 return Bbox.from_bounds(tx,ty,0,0)
 

Added: trunk/matplotlib/lib/mpl_toolkits/axes_grid/ChangeLog
===
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/ChangeLog   
(rev 0)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/ChangeLog   2009-05-05 
03:27:48 UTC (rev 7084)
@@ -0,0 +1,8 @@
+2009-05-04  Jae-Joon Lee  
+
+   * inset_locator.py (inset_axes, zoomed_inset_axes): axes_class support
+
+   * axislines.py : Better support for tick (tick label) color
+   handling
+   (Axes.get_children): fix typo
+

Modified: trunk/matplotlib/lib/mpl_toolkits/axes_grid/axislines.py
===
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/axislines.py2009-05-04 
20:14:40 UTC (rev 7083)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/axislines.py2009-05-05 
03:27:48 UTC (rev 7084)
@@ -200,16 +200,18 @@
 nth_coord = 1
 elif loc in ["bottom", "top"]:
 nth_coord = 0
+
+self.nth_coord = nth_coord
+self.axis = [self.axes.xaxis, self.axes.yaxis][self.nth_coord]
+
+super(AxisLineHelper.Fixed, self).__init__(loc)
+
 if passingthrough_point is None:
 passingthrough_point = self._default_passthru_pt[loc]
 if label_direction is None:
 label_direction = loc
 
-super(AxisLineHelper.Fixed, self).__init__(loc)
 
-self.nth_coord = nth_coord
-self.axis = [self.axes.xaxis, self.axes.yaxis][self.nth_coord]
-
 self.passthru_pt = passingthrough_point
 
 _verts = np.array([[0., 0.],
@@ -456,11 +458,48 @@
 def __init__(self, ticksize, **kwargs):
 self.ticksize = ticksize
 self.locs_angles = []
+
+self._axis = kwargs.pop("axis", None)
+if self._axis is not None:
+if "color" not in kwargs:
+kwargs["color"]