|
From: Derek T. <der...@gm...> - 2013-04-04 16:06:23
|
I posted a related question on stackoverflow (http://stackoverflow.com/questions/15815862/apply-affine-transform-to-quiver-in-python-matplotlib) but I've produced a simple enough example with strange results that I think it merits attention here. I'm trying to apply affine transforms to quiver and scatter plots. In all cases that I've considered, the scatter and quiver plots transform opposite the regular plot. Here's a minimal case: import matplotlib as mpl from pylab import figure, subplot, plot, scatter, show, axis figure() ax = subplot(111) base_trans = ax.transData tr = mpl.transforms.Affine2D(matrix = array([[1,1,0],[0,1,0],[0,0,1]])) + base_trans plot( [1,2,3], [1,2,3], 'k.', transform = tr ) scatter( [1,2,3], [1,2,3], c = 'k', marker = 'D', transform = tr ) axis([0,7,0,7]) show() Thanks, Derek |