Caught by the default Reply-to...
---------- Forwarded message ---------- From: Scott Sinclair <scott.sinclair...@gmail.com> Date: 8 July 2010 13:46 Subject: Re: [Matplotlib-users] plotting irregular spaced data To: Ross Williamson <rosswilliamson....@gmail.com> >On 8 July 2010 00:15, Ross Williamson <rosswilliamson....@gmail.com> wrote: > I have a set of 2d data (2d array) z > (100x100) which I need to plot - I have a nominal set of x and y > positions say: > > x = linspace(0,100) > y = linspace(0,100) > > Now the actual positions of the points in z are given by the following: > > u,v = meshgrid(x,y) > > phi = arctan2(v,u) > theta = arcsin(u/cos(phi)) > > so I have three 2d arrays (100x100) which describe the postion > (phi,theta) of the points in z > > How do I go about plotting these say using imshow? If your z are actually values at points in (phi, theta), you might find it easier to use scatter(). >>> import matplotlib.pyplot as plt >>> plt.scatter(phi.ravel(), theta.ravel(), c=z.ravel(), edgecolors='none') >>> plt.colorbar() Cheers, Scott ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users