SF.net SVN: matplotlib:[7730] trunk/matplotlib/lib/mpl_toolkits/axes_grid/ inset_locator.py

2009-09-10 Thread leejjoon
Revision: 7730
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7730&view=rev
Author:   leejjoon
Date: 2009-09-10 08:15:48 + (Thu, 10 Sep 2009)

Log Message:
---
axes_grid: fix inset_axes bug

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

Modified: trunk/matplotlib/lib/mpl_toolkits/axes_grid/inset_locator.py
===
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/inset_locator.py
2009-09-09 20:01:03 UTC (rev 7729)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/inset_locator.py
2009-09-10 08:15:48 UTC (rev 7730)
@@ -276,9 +276,14 @@
   inset_axes = axes_class(parent_axes.figure, parent_axes.get_position(),
   **axes_kwargs)
 
-   axes_locator = AnchoredSizeLocator(parent_axes.bbox,
+   if bbox_to_anchor is None:
+  bbox_to_anchor = parent_axes.bbox
+
+   axes_locator = AnchoredSizeLocator(bbox_to_anchor,
   width, height,
-  loc=loc)
+  loc=loc,
+  bbox_transform=bbox_transform,
+  **kwargs)
 
inset_axes.set_axes_locator(axes_locator)
 


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7731] trunk/toolkits/basemap/lib/mpl_toolkits/ basemap/netcdftime.py

2009-09-10 Thread jswhit
Revision: 7731
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7731&view=rev
Author:   jswhit
Date: 2009-09-10 11:36:16 + (Thu, 10 Sep 2009)

Log Message:
---
fixes for date2index from David Huard

Modified Paths:
--
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdftime.py

Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdftime.py
===
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdftime.py   
2009-09-10 08:15:48 UTC (rev 7730)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdftime.py   
2009-09-10 11:36:16 UTC (rev 7731)
@@ -966,42 +966,42 @@
 return numpy.all( num2date(t, nctime.units, calendar) == dates)
 
 
-
 def date2index(dates, nctime, calendar=None, select='exact'):
 """
 date2index(dates, nctime, calendar=None, select='exact')
-
+   
 Return indices of a netCDF time variable corresponding to the given dates.
-
+   
 @param dates: A datetime object or a sequence of datetime objects.
 The datetime objects should not include a time-zone offset.
-
+   
 @param nctime: A netCDF time variable object. The nctime object must have a
-C{units} attribute. The entries are assumed to be stored in increasing 
+C{units} attribute. The entries are assumed to be stored in increasing
 order.
-
+   
 @param calendar: Describes the calendar used in the time calculation.
 Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'
 'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.
 Default is C{'standard'}, which is a mixed Julian/Gregorian calendar
 If C{calendar} is None, its value is given by C{nctime.calendar} or
 C{standard} if no such attribute exists.
-
+   
 @param select: C{'exact', 'before', 'after', 'nearest'}
-  The index selection method. C{exact} will return the indices perfectly 
-  matching the dates given. C{before} and C{after} will return the indices 
-  corresponding to the dates just before or just after the given dates if 
-  an exact match cannot be found. C{nearest} will return the indices that 
-  correpond to the closest dates. 
+  The index selection method. C{exact} will return the indices perfectly
+  matching the dates given. C{before} and C{after} will return the indices
+  corresponding to the dates just before or just after the given dates if
+  an exact match cannot be found. C{nearest} will return the indices that
+  correpond to the closest dates.
 """
 # Setting the calendar.
-if calendar is None:
+   
+if calendar == None:
 calendar = getattr(nctime, 'calendar', 'standard')
-
+   
 num = numpy.atleast_1d(date2num(dates, nctime.units, calendar))
-
+   
 # Trying to infer the correct index from the starting time and the stride.
-# This assumes that the times are increasing uniformly. 
+# This assumes that the times are increasing uniformly.
 t0, t1 = nctime[:2]
 dt = t1 - t0
 index = numpy.array((num-t0)/dt, int)
@@ -1010,36 +1010,39 @@
 # If the times do not correspond, then it means that the times
 # are not increasing uniformly and we try the bisection method.
 if not _check_index(index, dates, nctime, calendar):
-
+   
 # Use the bisection method. Assumes the dates are ordered.
 import bisect
-
+   
 index = numpy.array([bisect.bisect_left(nctime, n) for n in num], int)
-
-nomatch = num2date(nctime[index], nctime.units) != dates
-
+   
+# Find the dates for which the match is not perfect.
+# Use list comprehension instead of the simpler `nctime[index]` since
+# not all time objects support numpy integer indexing (eg dap).
+ncnum = numpy.squeeze([nctime[i] for i in index])
+mismatch = numpy.nonzero(ncnum != num)[0]
+   
 if select == 'exact':
-if not (num2date(nctime[index], nctime.units) == dates).all():
-raise ValueError, 'Dates not found.'
-
+if len(mismatch) > 0:
+raise ValueError, 'Some dates not found.'
+   
 elif select == 'before':
-index[nomatch] -= 1
-
+index[mismatch] -= 1
+   
 elif select == 'after':
 pass
-
+   
 elif select == 'nearest':
-index[nomatch] = index[nomatch] - 1 * ( num[nomatch] < 
(nctime[index[nomatch]-1] + nctime[index[nomatch]]) / 2. )
-
+nearest_to_left = num[mismatch] < numpy.array( [nctime[i-1] + 
nctime[i] for i in index[mismatch]]) / 2.
+index[mismatch] = index[mismatch] - 1 * nearest_to_left
+   
 else:
-raise ValueError, select
-
+raise ValueError("%s is not an option for the `select` 
argument."%select)
+   
 # convert numpy 

SF.net SVN: matplotlib:[7732] trunk/toolkits/basemap/lib/mpl_toolkits/ basemap/__init__.py

2009-09-10 Thread jswhit
Revision: 7732
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7732&view=rev
Author:   jswhit
Date: 2009-09-10 11:39:23 + (Thu, 10 Sep 2009)

Log Message:
---
change default calendar for date2index.

Modified Paths:
--
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py

Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-09-10 
11:36:16 UTC (rev 7731)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-09-10 
11:39:23 UTC (rev 7732)
@@ -3886,7 +3886,7 @@
 cdftime = netcdftime.utime(units,calendar=calendar)
 return cdftime.date2num(dates)
 
-def date2index(dates, nctime, calendar='proleptic_gregorian',select='exact'):
+def date2index(dates, nctime, calendar=None,select='exact'):
 """
 Return indices of a netCDF time variable corresponding to the given dates.
 
@@ -3915,10 +3915,10 @@
  Valid calendars ``standard``, ``gregorian``,
  ``proleptic_gregorian``, ``noleap``, ``365_day``,
  ``julian``, ``all_leap``, ``366_day``.
- Default is ``proleptic_gregorian``.
  If ``calendar=None``, will use ``calendar`` attribute
  of ``nctime`` object, and if that attribute does 
  not exist calendar is set to ``standard``. 
+ Default is ``None``.
 select   The index selection method. ``exact`` will return the
  indices perfectly matching the dates given. 
  ``before`` and ``after`` will return the indices


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


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

2009-09-10 Thread astraw
Revision: 7733
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7733&view=rev
Author:   astraw
Date: 2009-09-10 22:32:08 + (Thu, 10 Sep 2009)

Log Message:
---
testing: add test for SF#2856495

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

Added Paths:
---
trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py

Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===
--- trunk/matplotlib/lib/matplotlib/__init__.py 2009-09-10 11:39:23 UTC (rev 
7732)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2009-09-10 22:32:08 UTC (rev 
7733)
@@ -878,6 +878,7 @@
 
 default_test_modules = [
 'matplotlib.tests.test_agg',
+'matplotlib.tests.test_backend_svg',
 'matplotlib.tests.test_basic',
 'matplotlib.tests.test_cbook',
 'matplotlib.tests.test_transforms',

Added: trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py
===
--- trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py   
(rev 0)
+++ trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py   2009-09-10 
22:32:08 UTC (rev 7733)
@@ -0,0 +1,30 @@
+import matplotlib.pyplot as plt
+import numpy as np
+import cStringIO as StringIO
+import xml.parsers.expat
+from matplotlib.testing.decorators import knownfailureif
+
+...@knownfailureif(True)
+def test_visibility():
+# This is SF 2856495. See
+# 
https://sourceforge.net/tracker/?func=detail&aid=2856495&group_id=80706&atid=560720
+fig=plt.figure()
+ax=fig.add_subplot(1,1,1)
+
+x = np.linspace(0,4*np.pi,50)
+y = np.sin(x)
+yerr = np.ones_like(y)
+
+a,b,c=ax.errorbar(x,y,yerr=yerr,fmt='ko')
+for artist in b:
+artist.set_visible(False)
+
+fd = StringIO.StringIO()
+fig.savefig(fd,format='svg')
+
+fd.seek(0)
+buf = fd.read()
+fd.close()
+
+parser = xml.parsers.expat.ParserCreate()
+parser.Parse(buf) # this will raise ExpatError if the svg is invalid


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7734] branches/v0_99_maint/lib/matplotlib/lines.py

2009-09-10 Thread leejjoon
Revision: 7734
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7734&view=rev
Author:   leejjoon
Date: 2009-09-10 23:01:28 + (Thu, 10 Sep 2009)

Log Message:
---
fix a bug in Line2D.draw method that produces invalid svg when the line is 
invisible

Modified Paths:
--
branches/v0_99_maint/lib/matplotlib/lines.py

Modified: branches/v0_99_maint/lib/matplotlib/lines.py
===
--- branches/v0_99_maint/lib/matplotlib/lines.py2009-09-10 22:32:08 UTC 
(rev 7733)
+++ branches/v0_99_maint/lib/matplotlib/lines.py2009-09-10 23:01:28 UTC 
(rev 7734)
@@ -505,9 +505,10 @@
 self._transform_path(subslice)
 if self._transformed_path is None:
 self._transform_path()
+
+if not self.get_visible(): return
+
 renderer.open_group('line2d', self.get_gid())
-
-if not self._visible: return
 gc = renderer.new_gc()
 self._set_gc_clip(gc)
 


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


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

2009-09-10 Thread leejjoon
Revision: 7735
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7735&view=rev
Author:   leejjoon
Date: 2009-09-10 23:22:40 + (Thu, 10 Sep 2009)

Log Message:
---
Merged revisions 7727-7728,7734 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint


  r7727 | ryanmay | 2009-09-09 14:41:43 -0400 (Wed, 09 Sep 2009) | 1 line
  
  Include 'top' keyword argument in docstring for Figure.subplots_adjust().

  r7728 | mdboom | 2009-09-09 15:55:52 -0400 (Wed, 09 Sep 2009) | 2 lines
  
  Fix some documentation warnings.

  r7734 | leejjoon | 2009-09-10 19:01:28 -0400 (Thu, 10 Sep 2009) | 1 line
  
  fix a bug in Line2D.draw method that produces invalid svg when the line is 
invisible


Modified Paths:
--
trunk/matplotlib/doc/api/spine_api.rst
trunk/matplotlib/doc/mpl_toolkits/mplot3d/tutorial.rst
trunk/matplotlib/doc/users/image_tutorial.rst
trunk/matplotlib/doc/users/index.rst
trunk/matplotlib/doc/users/pyplot_tutorial.rst
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/figure.py
trunk/matplotlib/lib/matplotlib/lines.py
trunk/matplotlib/lib/matplotlib/mlab.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/examples/misc/multiprocess.py
trunk/matplotlib/examples/mplot3d/contour3d_demo.py
trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
trunk/matplotlib/examples/mplot3d/polys3d_demo.py
trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
trunk/matplotlib/examples/mplot3d/surface3d_demo.py
trunk/matplotlib/examples/mplot3d/wire3d_demo.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py

trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png


Property changes on: trunk/matplotlib
___
Modified: svnmerge-integrated
   - /branches/mathtex:1-7263 /branches/v0_99_maint:1-7703 
/branches/v0_98_5_maint:1-7253
   + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 
/branches/v0_99_maint:1-7734
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,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703
   + /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,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734

Modified: trunk/matplotlib/doc/api/spine_api.rst
===
--- trunk/matplotlib/doc/api/spine_api.rst  2009-09-10 23:01:28 UTC (rev 
7734)
+++ trunk/matplotlib/doc/api/spine_api.rst  2009-09-10 23:22:40 UTC (rev 
7735)
@@ -6,7 +6,7 @@
 :mod:`matplotlib.spine`
 
 
-.. automodule:: matplotlib.spine
+.. automodule:: matplotlib.spines
:members:
:undoc-members:
:show-inheritance:

Modified: trunk/matplotlib/doc/mpl_toolkits/mplot3d/tutorial.rst
===
--- trunk/matplotlib/doc/mpl_toolkits/mplot3d/tutorial.rst  2009-09-10 
23:01:28 UTC (rev 7734)
+++ trunk/matplotlib/doc/mpl_toolkits/mplot3d/tutorial.rst  2009-09-10 
23:22:40 UTC (rev 7735)
@@ -55,7 +55,7 @@
 
 Polygon plots
 
-.. automethod:: add_collection3d
+.. automethod:: Axes3D.add_collection3d
 
 .. plot:: mpl_examples/mplot3d/polys3d_demo.py
 


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

SF.net SVN: matplotlib:[7736] trunk/matplotlib/lib/matplotlib/tests/ test_backend_svg.py

2009-09-10 Thread astraw
Revision: 7736
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7736&view=rev
Author:   astraw
Date: 2009-09-10 23:52:54 + (Thu, 10 Sep 2009)

Log Message:
---
testing: remove known failure now that bug is fixed

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py

Modified: trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py
===
--- trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py   2009-09-10 
23:22:40 UTC (rev 7735)
+++ trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py   2009-09-10 
23:52:54 UTC (rev 7736)
@@ -4,7 +4,6 @@
 import xml.parsers.expat
 from matplotlib.testing.decorators import knownfailureif
 
-...@knownfailureif(True)
 def test_visibility():
 # This is SF 2856495. See
 # 
https://sourceforge.net/tracker/?func=detail&aid=2856495&group_id=80706&atid=560720


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7737] trunk/matplotlib/lib/matplotlib/tests/ test_axes.py

2009-09-10 Thread jdh2358
Revision: 7737
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7737&view=rev
Author:   jdh2358
Date: 2009-09-11 01:26:41 + (Fri, 11 Sep 2009)

Log Message:
---
add test to expose hexbin extent bug #2856228

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/tests/test_axes.py

Modified: trunk/matplotlib/lib/matplotlib/tests/test_axes.py
===
--- trunk/matplotlib/lib/matplotlib/tests/test_axes.py  2009-09-10 23:52:54 UTC 
(rev 7736)
+++ trunk/matplotlib/lib/matplotlib/tests/test_axes.py  2009-09-11 01:26:41 UTC 
(rev 7737)
@@ -2,8 +2,8 @@
 import matplotlib
 from matplotlib.testing.decorators import image_comparison, knownfailureif
 import matplotlib.pyplot as plt
-import pylab
 
+
 @image_comparison(baseline_images=['formatter_ticker_001',
'formatter_ticker_002',
'formatter_ticker_003',
@@ -20,8 +20,8 @@
 ydata1 = [ (1.5*y - 0.5)*units.km for y in range(10) ]
 ydata2 = [ (1.75*y - 1.0)*units.km for y in range(10) ]
 
-fig = pylab.figure()
-ax = pylab.subplot( 111 )
+fig = plt.figure()
+ax = plt.subplot( 111 )
 ax.set_xlabel( "x-label 001" )
 fig.savefig( 'formatter_ticker_001' )
 
@@ -49,7 +49,7 @@
 
 # Offset Points
 
-fig = pylab.figure()
+fig = plt.figure()
 ax = fig.add_subplot( 111, autoscale_on=False, xlim=(-1,5), ylim=(-3,5) )
 line, = ax.plot( t, s, lw=3, color='purple' )
 
@@ -74,7 +74,7 @@
 r = np.arange(0.0, 1.0, 0.001 )
 theta = 2.0 * 2.0 * np.pi * r
 
-fig = pylab.figure()
+fig = plt.figure()
 ax = fig.add_subplot( 111, polar=True )
 line, = ax.plot( theta, r, color='#ee8d18', lw=3 )
 
@@ -102,7 +102,7 @@
 from matplotlib.patches import Ellipse
 el = Ellipse((0,0), 10, 20, facecolor='r', alpha=0.5)
 
-fig = pylab.figure()
+fig = plt.figure()
 ax = fig.add_subplot( 111, aspect='equal' )
 
 ax.add_artist( el )
@@ -134,7 +134,7 @@
 value = 10.0 * units.deg
 day = units.Duration( "ET", 24.0 * 60.0 * 60.0 )
 
-fig = pylab.figure()
+fig = plt.figure()
 
 # Top-Left
 ax1 = fig.add_subplot( 221 )
@@ -166,12 +166,12 @@
 
 @image_comparison(baseline_images=['single_point'])
 def test_single_point():
-fig = pylab.figure()
-pylab.subplot( 211 )
-pylab.plot( [0], [0], 'o' )
+fig = plt.figure()
+plt.subplot( 211 )
+plt.plot( [0], [0], 'o' )
 
-pylab.subplot( 212 )
-pylab.plot( [1], [1], 'o' )
+plt.subplot( 212 )
+plt.plot( [1], [1], 'o' )
 
 fig.savefig( 'single_point' )
 
@@ -180,12 +180,12 @@
 time1=[ 721964.0 ]
 data1=[ -65.54 ]
 
-fig = pylab.figure()
-pylab.subplot( 211 )
-pylab.plot_date( time1, data1, 'o', color='r' )
+fig = plt.figure()
+plt.subplot( 211 )
+plt.plot_date( time1, data1, 'o', color='r' )
 
-pylab.subplot( 212 )
-pylab.plot( time1, data1, 'o', color='r' )
+plt.subplot( 212 )
+plt.plot( time1, data1, 'o', color='r' )
 
 fig.savefig( 'single_date' )
 
@@ -218,33 +218,33 @@
 y2 = np.arange( 10 )
 y2.shape = 10, 1
 
-fig = pylab.figure()
-pylab.subplot( 411 )
-pylab.plot( y1 )
-pylab.subplot( 412 )
-pylab.plot( y2 )
+fig = plt.figure()
+plt.subplot( 411 )
+plt.plot( y1 )
+plt.subplot( 412 )
+plt.plot( y2 )
 
-pylab.subplot( 413 )
+plt.subplot( 413 )
 from nose.tools import assert_raises
-assert_raises(ValueError,pylab.plot, (y1,y2))
+assert_raises(ValueError,plt.plot, (y1,y2))
 
-pylab.subplot( 414 )
-pylab.plot( xdata[:,1], xdata[1,:], 'o' )
+plt.subplot( 414 )
+plt.plot( xdata[:,1], xdata[1,:], 'o' )
 
 fig.savefig( 'shaped data' )
 
 @image_comparison(baseline_images=['const_xy'])
 def test_const_xy():
-fig = pylab.figure()
+fig = plt.figure()
 
-pylab.subplot( 311 )
-pylab.plot( np.arange(10), np.ones( (10,) ) )
+plt.subplot( 311 )
+plt.plot( np.arange(10), np.ones( (10,) ) )
 
-pylab.subplot( 312 )
-pylab.plot( np.ones( (10,) ), np.arange(10) )
+plt.subplot( 312 )
+plt.plot( np.ones( (10,) ), np.arange(10) )
 
-pylab.subplot( 313 )
-pylab.plot( np.ones( (10,) ), np.ones( (10,) ), 'o' )
+plt.subplot( 313 )
+plt.plot( np.ones( (10,) ), np.ones( (10,) ), 'o' )
 
 fig.savefig( 'const_xy' )
 
@@ -254,24 +254,24 @@
 def test_polar_wrap():
 D2R = np.pi / 180.0
 
-fig = pylab.figure()
+fig = plt.figure()
 
 #NOTE: resolution=1 really should be the default
-pylab.subplot( 111, polar=True, resolution=1 )
-pylab.polar( [179*D2R, -179*D2R], [0.2, 0.1], "b.-" )
-pylab.polar( [179*D2R,  181*D2R], [0.2, 0.1], "g.-" )
-pylab.rgrids( [0.05, 0.1, 0.15, 0.2, 0.25, 0.3] )
+plt.subplot( 111, polar=True, resolution=1 )
+plt.polar( [179*D2R, -179*D2R], [0.2, 0.1], "b.-" )
+plt.polar( [179*D2R,  181*D2R], [0.2, 0.1], "g.-" )

SF.net SVN: matplotlib:[7738] trunk/matplotlib/lib/matplotlib/tests/ test_axes.py

2009-09-10 Thread jdh2358
Revision: 7738
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7738&view=rev
Author:   jdh2358
Date: 2009-09-11 01:33:40 + (Fri, 11 Sep 2009)

Log Message:
---
choose different scaling and extent for hexbin test

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/tests/test_axes.py

Modified: trunk/matplotlib/lib/matplotlib/tests/test_axes.py
===
--- trunk/matplotlib/lib/matplotlib/tests/test_axes.py  2009-09-11 01:26:41 UTC 
(rev 7737)
+++ trunk/matplotlib/lib/matplotlib/tests/test_axes.py  2009-09-11 01:33:40 UTC 
(rev 7738)
@@ -347,11 +347,11 @@
 fig = plt.figure()
 
 ax = fig.add_subplot(111)
-data = np.arange(2000.)
+data = np.arange(2000.)/2000.
 data.shape = 2, 1000
 x, y = data
 
-ax.hexbin(x, y, extent=[-.4, .4, -.4, .4])
+ax.hexbin(x, y, extent=[.1, .3, .6, .7])
 fig.savefig('hexbin_extent')
 
 


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7739] trunk/matplotlib/lib/matplotlib/tests/ test_axes.py

2009-09-10 Thread jdh2358
Revision: 7739
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7739&view=rev
Author:   jdh2358
Date: 2009-09-11 01:52:47 + (Fri, 11 Sep 2009)

Log Message:
---
make test for sf bug 2856228 a knownfailure

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/tests/test_axes.py

Modified: trunk/matplotlib/lib/matplotlib/tests/test_axes.py
===
--- trunk/matplotlib/lib/matplotlib/tests/test_axes.py  2009-09-11 01:33:40 UTC 
(rev 7738)
+++ trunk/matplotlib/lib/matplotlib/tests/test_axes.py  2009-09-11 01:52:47 UTC 
(rev 7739)
@@ -341,7 +341,8 @@
 fig.savefig( 'axhspan_epoch' )
 
 
-...@image_comparison(baseline_images=['hexbin_extent'])
+...@image_comparison(baseline_images=['hexbin_extent'])
+...@knownfailureif(True)
 def test_hexbin_extent():
 # this test exposes sf bug 2856228
 fig = plt.figure()


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7740] branches/v0_99_maint/lib/matplotlib/axes.py

2009-09-10 Thread astraw
Revision: 7740
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7740&view=rev
Author:   astraw
Date: 2009-09-11 01:54:27 + (Fri, 11 Sep 2009)

Log Message:
---
bugfix: bounds checking in hexbin with extent specified (SF#2856228)

Modified Paths:
--
branches/v0_99_maint/lib/matplotlib/axes.py

Modified: branches/v0_99_maint/lib/matplotlib/axes.py
===
--- branches/v0_99_maint/lib/matplotlib/axes.py 2009-09-11 01:52:47 UTC (rev 
7739)
+++ branches/v0_99_maint/lib/matplotlib/axes.py 2009-09-11 01:54:27 UTC (rev 
7740)
@@ -5624,9 +5624,13 @@
 
 for i in xrange(len(x)):
 if bdist[i]:
-lattice1[ix1[i], iy1[i]]+=1
+if ((ix1[i] >= 0) and (ix1[i] < nx1) and
+(iy1[i] >= 0) and (iy1[i] < ny1)):
+lattice1[ix1[i], iy1[i]]+=1
 else:
-lattice2[ix2[i], iy2[i]]+=1
+if ((ix2[i] >= 0) and (ix2[i] < nx2) and
+(iy2[i] >= 0) and (iy2[i] < ny2)):
+lattice2[ix2[i], iy2[i]]+=1
 
 # threshold
 if mincnt is not None:
@@ -5658,9 +5662,13 @@
 
 for i in xrange(len(x)):
 if bdist[i]:
-lattice1[ix1[i], iy1[i]].append( C[i] )
+if ((ix1[i] >= 0) and (ix1[i] < nx1) and
+(iy1[i] >= 0) and (iy1[i] < ny1)):
+lattice1[ix1[i], iy1[i]].append( C[i] )
 else:
-lattice2[ix2[i], iy2[i]].append( C[i] )
+if ((ix2[i] >= 0) and (ix2[i] < nx2) and
+(iy2[i] >= 0) and (iy2[i] < ny2)):
+lattice2[ix2[i], iy2[i]].append( C[i] )
 
 
 for i in xrange(nx1):


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7741] branches/v0_99_maint/doc

2009-09-10 Thread jdh2358
Revision: 7741
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7741&view=rev
Author:   jdh2358
Date: 2009-09-11 02:06:30 + (Fri, 11 Sep 2009)

Log Message:
---
minor tweaks to licensing devel doc

Modified Paths:
--
branches/v0_99_maint/doc/devel/coding_guide.rst
branches/v0_99_maint/doc/users/credits.rst

Modified: branches/v0_99_maint/doc/devel/coding_guide.rst
===
--- branches/v0_99_maint/doc/devel/coding_guide.rst 2009-09-11 01:54:27 UTC 
(rev 7740)
+++ branches/v0_99_maint/doc/devel/coding_guide.rst 2009-09-11 02:06:30 UTC 
(rev 7741)
@@ -578,7 +578,7 @@
 
 The two dominant license variants in the wild are GPL-style and
 BSD-style. There are countless other licenses that place specific
-restrictions on code reuse, but there is an important different to be
+restrictions on code reuse, but there is an important difference to be
 considered in the GPL and BSD variants.  The best known and perhaps
 most widely used license is the GPL, which in addition to granting you
 full rights to the source code including redistribution, carries with
@@ -587,7 +587,7 @@
 license. I.e., you are required to give the source code to other
 people and give them the right to redistribute it as well. Many of the
 most famous and widely used open source projects are released under
-the GPL, including sagemath, linux, gcc and emacs.
+the GPL, including linux, gcc, emacs and sage.
 
 The second major class are the BSD-style licenses (which includes MIT
 and the python PSF license). These basically allow you to do whatever
@@ -606,20 +606,20 @@
 sense of the last paragraph are the BSD operating system, python and
 TeX.
 
-There are two primary reasons why early matplotlib developers selected
-a BSD compatible license. We wanted to attract as many users and
-developers as possible, and many software companies will not use GPL code
-in software they plan to distribute, even those that are highly
-committed to open source development, such as `enthought
+There are several reasons why early matplotlib developers selected a
+BSD compatible license. matplotlib is a python extension, and we
+choose a license that was based on the python license (BSD
+compatible).  Also, we wanted to attract as many users and developers
+as possible, and many software companies will not use GPL code in
+software they plan to distribute, even those that are highly committed
+to open source development, such as `enthought
 `_, out of legitimate concern that use of the
 GPL will "infect" their code base by its viral nature. In effect, they
-want to retain the right to release some proprietary code. Companies,
-and institutions in general, who use matplotlib often make significant
-contributions, since they have the resources to get a job done, even a
-boring one, if they need it in their code. Two of the matplotlib
-backends (FLTK and WX) were contributed by private companies.
-
-The other reason is licensing compatibility with the other python
-extensions for scientific computing: ipython, numpy, scipy, the
-enthought tool suite and python itself are all distributed under BSD
-compatible licenses.
+want to retain the right to release some proprietary code. Companies
+and institutions who use matplotlib often make significant
+contributions, because they have the resources to get a job done, even
+a boring one. Two of the matplotlib backends (FLTK and WX) were
+contributed by private companies.  The final reason behind the
+licensing choice is compatibility with the other python extensions for
+scientific computing: ipython, numpy, scipy, the enthought tool suite
+and python itself are all distributed under BSD compatible licenses.

Modified: branches/v0_99_maint/doc/users/credits.rst
===
--- branches/v0_99_maint/doc/users/credits.rst  2009-09-11 01:54:27 UTC (rev 
7740)
+++ branches/v0_99_maint/doc/users/credits.rst  2009-09-11 02:06:30 UTC (rev 
7741)
@@ -18,7 +18,11 @@
 
 Andrew Straw provided much of the log scaling architecture, the fill
   command, PIL support for imshow, and provided many examples.  He
-  also wrote the support for dropped axis spines.
+  also wrote the support for dropped axis spines and the `buildbot
+  `_ unit testing infrastructure
+  which triggers the JPL/James Evans platform specific builds and
+  regression test image comparisons from svn matplotlib across
+  platforms on svn commits.
 
 Charles Twardy
   provided the impetus code for the legend class and has made
@@ -116,11 +120,14 @@
   at `NOAA `_ wrote the
   :ref:`toolkit_basemap` tookit
 
-Sigve Tjoraand, Ted Drain
+Sigve Tjoraand, Ted Drain, James Evans 
   and colleagues at the `JPL `_ collaborated
   on the QtAgg backend and sponsored development of a number of
   featu

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

2009-09-10 Thread jdh2358
Revision: 7742
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7742&view=rev
Author:   jdh2358
Date: 2009-09-11 02:11:11 + (Fri, 11 Sep 2009)

Log Message:
---
Merged revisions 7740-7741 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint


  r7740 | astraw | 2009-09-10 18:54:27 -0700 (Thu, 10 Sep 2009) | 2 lines
  
  bugfix: bounds checking in hexbin with extent specified (SF#2856228)

  r7741 | jdh2358 | 2009-09-10 19:06:30 -0700 (Thu, 10 Sep 2009) | 1 line
  
  minor tweaks to licensing devel doc


Modified Paths:
--
trunk/matplotlib/doc/devel/coding_guide.rst
trunk/matplotlib/doc/users/credits.rst
trunk/matplotlib/lib/matplotlib/axes.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/examples/misc/multiprocess.py
trunk/matplotlib/examples/mplot3d/contour3d_demo.py
trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
trunk/matplotlib/examples/mplot3d/polys3d_demo.py
trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
trunk/matplotlib/examples/mplot3d/surface3d_demo.py
trunk/matplotlib/examples/mplot3d/wire3d_demo.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py

trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png


Property changes on: trunk/matplotlib
___
Modified: svnmerge-integrated
   - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 
/branches/v0_99_maint:1-7734
   + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 
/branches/v0_99_maint:1-7741
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,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734
   + /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,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741

Modified: trunk/matplotlib/doc/devel/coding_guide.rst
===
--- trunk/matplotlib/doc/devel/coding_guide.rst 2009-09-11 02:06:30 UTC (rev 
7741)
+++ trunk/matplotlib/doc/devel/coding_guide.rst 2009-09-11 02:11:11 UTC (rev 
7742)
@@ -604,74 +604,7 @@
 .. _license-discussion:
 
 
-Licenses
-
 
-Matplotlib only uses BSD compatible code.  If you bring in code from
-another project make sure it has a PSF, BSD, MIT or compatible license
-(see the Open Source Initiative `licenses page
-`_ for details on individual
-licenses).  If it doesn't, you may consider contacting the author and
-asking them to relicense it.  GPL and LGPL code are not acceptable in
-the main code base, though we are considering an alternative way of
-distributing L/GPL code through an separate channel, possibly a
-toolkit.  If you include code, make sure you include a copy of that
-code's license in the license directory if the code's license requires
-you to distribute the license with it.  Non-BSD compatible licenses
-are acceptable in matplotlib toolkits (eg basemap), but make sure you
-clearly state the licenses you are using.
-
-Why BSD compatible?

-
-The two dominant license variants in the wild are GPL-style and
-BSD-style. There are countless other licenses that place specific
-restrictions on code reuse, but there is an important different to be
-considered in the GPL and BSD variants.  The best known and perhaps
-most widely used license is the GPL, which in addition to granting you
-full rights to the source code including redistribution, carries with
-it an extra obligation. If you use GPL code in your own code, or link
-wi