John Hunter wrote:
> On the 0.91 branch, there was an example called clippedline.py that
> did a searchsorted on the xdata based on the xlim to cull out points
> far outside the view limits.  This is useful if you have a really long
> time series and want to navigate through it.
>
> This is broken on the trunk, but before I dive too deep into trying to
> fix it, I wanted to get some input about the best way to go about this
> given the new transforms/path infrastructure.  Michael, I know you did
> some work to make this kind of use more efficient by default, so I
> wanted to get your opinion on the best place to go about making this
> kind of optimization.
>   
This sort of culling happens automatically in the Agg backend now, 
without any data copies (see agg_py_path_iterator.h).  Unfortunately, 
that doesn't actually make it any easier to do this sort of thing from 
Python.

As for the bug in clippedline.py -- Line2D objects store _xorig, _yorig 
(the original data) and _x, _y (unit converted data).  The difference 
now is that _x and _y are computed less often, so they don't actually 
exist during the call to ClippedLine.set_data.  You can force their 
computation by calling self.recache() after the call to 
Line2D.set_data(), or we can restore the old behavior by calling 
recache() at the bottom of Line2D.set_data(), albeit with a performance 
penalty on panning/zooming due to the tick lines taking longer to move.

Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to