On Tue, Dec 20, 2011 at 9:22 AM, Brad Malone <email@example.com> wrote:
HI Paul,Thanks. I didn't realize it was that simple (appears that doing this essentially plots everything against integers in x and y). This will be a good backup plan if I can't get pcolor to work, although as you say, I'll have to fiddle around some with the axis formatters and such I suppose to get a good final plot out of this.Best,BradOn Tue, Dec 20, 2011 at 12:12 AM, Paul Ivanov <firstname.lastname@example.org> wrote:
Hey again, Brad,
Brad Malone, on 2011-12-19 23:44, wrote:
> Hi, I am plotting a grid with pcolor. Below I've got a 1000x1000 grid.
> > yi=linspace(-0.1,maxfreq+10,1000)
> > print 'Calling griddata...'
> > zi=griddata(x,y,z,xi,yi,interp='nn')
> > plt.pcolor(xi,yi,zi,cmap=plt.cm.hot)
> How could I modify my above data (which is in xi,yi,and zi) toTry either:
> work with imshow (which seems to take 1 argument for data).
The first should be the quickest - it doesn't do any
fancy interpolation, and actually just passes some arguments to
the second. Using imshow directly, however, allows you to set a
different type of interpolation, should you desire it. If
you want xi and yi to be accurately reflect in the plot, you
might have to play around with changing the axis formatters
(though there might be an easier way of doing that, which escapes
me right now)
You may also want to try:
If I remember correctly, pcolormesh is faster but a bit more restrictive. (I think it's slower than matshow and imshow).
P.S. I never knew about matshow; thanks Paul!