Thank you so much Jae-Joon and Tony. You saved me so much time ! The
whole transforms system was very obscure (to me !).

>>  trans = (ax.transScale + ax.transLimits).inverted()

----
barspace = 0.32 #inches
barstep  = abscissa[1] - abscissa[0]
trans = (ax.transScale + ax.transLimits).inverted()
barspacedata = trans.transform([barspace,0.0])
barwidth = barstep - barspacedata[0]
----
Works great !

> I just wanted to add a little bit to Jae-Joon's example. I feel like I have
> to relearn the axes transformations every time I deal with them. Your email
> reminded me to write things down, and I thought I'd share it, in case others
> find it useful. Let me know if anything is wrong/unclear.

Everything is very clear now. Thanks for taking the time to detail
everything, it's priceless.

> It's important to note that these are two **very different** approaches. The
> first point (red dot) above is always referenced to axes space and will
> remain
> in the center of the plot, even if you change the axes limits (try panning
> in
> interactive mode).
>
> On the other hand, the second point (green square) is referenced to the data
> space and will move with the data if the axes limits are changed.
>
>

I really liked your small example. I wish we could publish it on scipy
or something.

Best regards.
Mat.

-------------------------------------------------------------------------
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to