Rich Fought wrote:
> I'm plotting some grid data using pcolor, and trying to get canvas pixel
> locations of data points using the
>
> ax.transData.xy_tup()
>
> method. I am saving these figures to PNG files using the default Agg
> backend. When I open these images up in Gimp and check the pixel
> locations, the X pixel locations are accurate, but the Y pixel locations
> I am getting from matplotlib seem to be exaggerated the further away
> from Y=0 I go. Am I using this method incorrectly? Could this be an
> artifact of the rendering to PNG?
>
I determined what is causing the exaggerated y-pixel values. I was using
axes().set_aspect('equal')
on the figure and this apparently does not get taken into account when using
ax.transData.xy_tup()
I tried setting the aspect in the original fig.add_subplot, but got the
same incorrect results.
ax = fig.add_subplot(111, aspect='equal')
Leaving the aspect alone gives correct pixel results.
Is this a bug, or expected behavior?
Rich
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users