The get/set_transform on an artist (any artist really), is an internal implementation detail that transforms points from data space all the way to pixels. It's not really useful to the end user, unless you want to have very low-level control over plotting. If you want to change how data points are converted into physical plot space, you probably want to look at creating a custom scale or projection documented here instead:
http://matplotlib.sourceforge.net/devel/add_new_projection.html Additionally, we should probably make private and/or undocument get/set_transform, or at the very least make the docstring more explicit that it is an internal function. Mike Thomas Robitaille wrote: > Hi, > > I have been trying to use the Affine2D transformation with pcolor and > contour, with no success. The following script and comments illustrates my > problems: > > matplotlib.use('Agg') > import matplotlib.pyplot as mpl > from matplotlib.transforms import Affine2D > import numpy as np > > image = np.random.random((100,100)) > > fig = mpl.figure() > ax = fig.add_subplot(1,1,1) > ax.pcolor(image, transform=Affine2D()) # Does not work - the image is not > there! > fig.savefig('test1.png') > The image is there, it's just in the lower left corner of the figure, outside of the axes. > fig = mpl.figure() > ax = fig.add_subplot(1,1,1) > ax.contour(image, transform=Affine2D()) # Ok, but transformation wouldn't > change anything anyway > fig.savefig('test2.png') > > fig = mpl.figure() > ax = fig.add_subplot(1,1,1) > ax.contour(image, transform=Affine2D().scale(10.,10.)) # Does not work - the > image is unchanged > fig.savefig('test3.png') > Contour ignores the standard transformation member -- again just an implementation detail. Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users