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

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to