On Jul 22, 2008, at 6:26 PM, Ryan May <[EMAIL PROTECTED]> wrote:

> John Hunter wrote:
>> On Mon, Jul 21, 2008 at 11:35 PM, Ryan May <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> Has anyone ever thought about creating a TextCollection class?  The
>>> purpose would be similar to the other collections, to group a  
>>> bunch of
>>> text objects with similar properties.  This probably couldn't  
>>> inherit
>>> from Collection as of now though, since Collection assumes things  
>>> like
>>> edgecolor and facecolor.  The bigger question to me is, could the
>>> backends make use of this to any improvement?  Or would this simply
>>> serve as an API to eliminate having to loop yourself (which would  
>>> pretty
>>> much make this useless).
>>>
>>> My own personal use case is (once again) in meteorology, where we do
>>> station plots.  This involves printing the actual value of observed
>>> variables relative to the location of the station.  This isn't  
>>> hard to
>>> do right now (especially since I have offset_copy back, thanks  
>>> Mike!).
>>> I just wasn't sure if the batch functionality of a Collection might
>>> serve some purpose to the users at large.
>>
>> I've thought of it many times and it would definitely be useful, eg
>> for tick labels.  Treating every label as a separate instance
>> definitely slows things down.
>>
>
> Ok, good to know.  I'll put it on my todo list then.  Do you think  
> this
> can inherit from Collection at all?  It seemed like a lot of the  
> methods
> in the Collection base class were specific to polygons or other  
> geometry
> and don't really make sense in the case of text.
>
>
>
> -------------------------

There's some precedent for treating text as a collection of paths; for  
instance, many eps exporters allow 'as path' or 'as text' as options.

I think most vector drawing apps treat the text color as a face color,  
and support an additional edge color for doing outline effects. So on  
that conceptual basis a collection seems appropriate, even if the  
renderer treats it differently than a polygon.

-Eric



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to