From: <ry...@us...> - 2009-08-19 07:56:43
|
Revision: 7506 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7506&view=rev Author: ryanmay Date: 2009-08-19 07:56:33 +0000 (Wed, 19 Aug 2009) Log Message: ----------- Remove calls to np.asarray(). This was breaking the use of masked arrays in calls to set_[x|y]data() and is handled appropriately already by set_data(). 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-18 22:18:59 UTC (rev 7505) +++ branches/v0_99_maint/lib/matplotlib/lines.py 2009-08-19 07:56:33 UTC (rev 7506) @@ -843,7 +843,6 @@ ACCEPTS: 1D array """ - x = np.asarray(x) self.set_data(x, self._yorig) def set_ydata(self, y): @@ -852,7 +851,6 @@ ACCEPTS: 1D array """ - y = np.asarray(y) self.set_data(self._xorig, y) def set_dashes(self, seq): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2009-08-25 15:31:19
|
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. |
From: Eric F. <ef...@ha...> - 2009-08-25 18:28:01
|
md...@us... wrote: > 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') Mike, I'm curious--why are both changes needed? Shouldn't the setting of self._subslice in the first chunk be enough? If not, it suggests that there are more general design problems here. Can a line object have an associated axes when it is created (or when data are fed to it) and then lose that axes attribute by the time draw() is called? If so, then it seems like the second chunk is the right one to keep, and the first one is useless. Eric |
From: <lee...@us...> - 2009-09-10 23:01:36
|
Revision: 7734 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7734&view=rev Author: leejjoon Date: 2009-09-10 23:01:28 +0000 (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.py 2009-09-10 22:32:08 UTC (rev 7733) +++ branches/v0_99_maint/lib/matplotlib/lines.py 2009-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. |
From: <md...@us...> - 2009-09-18 15:16:31
|
Revision: 7784 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7784&view=rev Author: mdboom Date: 2009-09-18 15:16:20 +0000 (Fri, 18 Sep 2009) Log Message: ----------- Fix bug where subslicing was cutting polar lines off (because it was treating them as if they were rectilinearly plotted). 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-09-18 14:28:39 UTC (rev 7783) +++ branches/v0_99_maint/lib/matplotlib/lines.py 2009-09-18 15:16:20 UTC (rev 7784) @@ -459,7 +459,10 @@ self._y = self._xy[:, 1] # just a view self._subslice = False - if self.axes and len(x) > 100 and self._is_sorted(x): + if (self.axes and len(x) > 100 and self._is_sorted(x) and + self.axes.name == 'rectilinear' and + self.axes.get_xscale() == 'linear' and + self.axes.get_yscale() == 'linear'): self._subslice = True if hasattr(self, '_path'): interpolation_steps = self._path._interpolation_steps This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Darren D. <dsd...@gm...> - 2009-08-19 22:35:39
|
Ryan, I don't think these calls should be removed. Would you convert them to asanyarray() instead? That will preserve the masked arrays. Darren > Log Message: > ----------- > Remove calls to np.asarray(). This was breaking the use of masked arrays in calls to set_[x|y]data() and is handled appropriately already by set_data(). > > 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-18 22:18:59 UTC (rev 7505) > +++ branches/v0_99_maint/lib/matplotlib/lines.py 2009-08-19 07:56:33 UTC (rev 7506) > @@ -843,7 +843,6 @@ > > ACCEPTS: 1D array > """ > - x = np.asarray(x) > self.set_data(x, self._yorig) > > def set_ydata(self, y): > @@ -852,7 +851,6 @@ > > ACCEPTS: 1D array > """ > - y = np.asarray(y) > self.set_data(self._xorig, y) > > def set_dashes(self, seq): > > > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins > -- "In our description of nature, the purpose is not to disclose the real essence of the phenomena but only to track down, so far as it is possible, relations between the manifold aspects of our experience" - Niels Bohr "It is a bad habit of physicists to take their most successful abstractions to be real properties of our world." - N. David Mermin "Once we have granted that any physical theory is essentially only a model for the world of experience, we must renounce all hope of finding anything like the correct theory ... simply because the totality of experience is never accessible to us." - Hugh Everett III |