SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] Re: PS backend wish list

From: Matt N. <new...@ca...> - 2005年04月04日 15:44:08
Hi John, 
On Mon, 4 Apr 2005, John Hunter wrote:
> >>>>> "Darren" == Darren Dale <dd...@co...> writes:
> Darren> I think we could get a performance boost if all 
> Darren> similar ticks were passed together to draw_markers, 
> Darren> right now they a are passed independently.
>
> We could, but it would require some redesign. Tick is a
> class, and the axis contains a list of ticks. Thus it would
> take some top-level redesign.
I'd also encourage looking at how the Ticks are implemented. I
believe that for simple plots (say, simple_plot.py), the tick
drawing is what dominates rendering time, at least in the WxAgg
backend (which is dominated by the Agg rendering time). I
wouldn't be surprised if this was the case for most backends.
As far as I can tell, each tick mark is a separate Line2D with 2
points and have all the available properties of a Line2D. That
seems like a fine approach (certainly easy), but it's definitely
overkill. My speed tests say that rendering one thousand lines
with two points is a lot slower than rendering two lines with
one thousand points (easy enough to test). That means tick
drawing can easily be the performance bottleneck.
I like Darren's and Paul's suggestion (set line properties once,
then have the ticks be a simple list of pen up / pen down). I
believe major and minor ticks would need to have different
properties, but it's still only 2 set of properties. I
understand that this might mean a significant redesign, but the
performance boost might be worth it.
Thanks,
--Matt
PS: Someone might want tick marks to have all the flexibility
that they currently enjoy. My guess is that this would be
unusual (I don't see any examples that use this flexibility),
and that such cases could just add custom lines themselves.

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /