Revision: 7567
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7567&view=rev
Author:   mdboom
Date:     2009-08-25 15:31:10 +0000 (Tue, 25 Aug 2009)

Log Message:
-----------
Support Line2D objects without associated Axes objects.

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.py        2009-08-25 11:54:24 UTC 
(rev 7566)
+++ branches/v0_99_maint/lib/matplotlib/lines.py        2009-08-25 15:31:10 UTC 
(rev 7567)
@@ -459,7 +459,7 @@
         self._y = self._xy[:, 1] # just a view
 
         self._subslice = False
-        if len(x) > 100 and self._is_sorted(x):
+        if self.axes and len(x) > 100 and self._is_sorted(x):
             self._subslice = True
         if hasattr(self, '_path'):
             interpolation_steps = self._path._interpolation_steps
@@ -496,7 +496,7 @@
     def draw(self, renderer):
         if self._invalid:
             self.recache()
-        if self._subslice:
+        if self._subslice and self.axes:
             # Need to handle monotonically decreasing case also...
             x0, x1 = self.axes.get_xbound()
             i0, = self._x.searchsorted([x0], 'left')


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

Reply via email to