On 06/24/2010 11:07 AM, Florian Berger wrote:
> Hi,
>
> Ryan May<rma...@gmail.com>:
>>
>> Michael Droettboom<md...@stsci.edu>  wrote:
>>> There is a guide about porting from the old transforms to the new
>>> transforms here:
>>>
>>> http://matplotlib.sourceforge.net/api/api_changes.html#notes-about-the-transforms-refactoring
>>
>> It's possible I'm missing something, but I don't see
>> matplotlib.transforms.Value() or anything remotely resembling it
>> mentioned there.
>
> Same with me. :)  Michael, I've checked the very document and just like
> Ryan I couldn't find any hint of what had become of that functionality.
>
> Here is a diff of transforms.py before and after the refactoring:
>
> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/transforms.py?r1=3513&r2=4817
>
> On the left side you see that Value() has been featured quite
> distinctively. After the refactoring there doesn't seem to be anything
> left of it. To a newbie like me this is striking, as it seems to be a
> major change in the API. I thus hoped it probably could have been moved
> to another module or something like this.

It was *such* a major change that Value and its ilk were completely 
replaced, not moved aside.  Value was a lazy value.  The original 
transforms system was based on lazy evaluation of expressions, for the 
sake of efficiency.  (The new transforms system achieves the same sort 
of efficiency but in a more general and extensible framework.)

To port code, you really have to look not for replacements for things 
like Value, but for how the structure changed so that they are not 
needed.  Essentially, you have to look at one level higher than the 
Value level--look at what you were trying to do with the code, not at 
how you implemented it via Value.  Unless you were using Value et al for 
your own purposes, rather than in Bbox etc, looking at this higher level 
should take you straight to the translations in the table that Mike made 
to help guide the transition.

Eric


>
> Still glad about any enlightenments. :)
>
> Best,
>       Florian
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to