Re: [Matplotlib-users] Why does contourf with the extend argument tweak the data limits?

2012-07-17 Thread Eric Firing
On 2012/07/09 7:33 AM, Brendan Barnwell wrote: On 2012-07-09 06:13, Benjamin Root wrote: On Sun, Jul 8, 2012 at 9:04 PM, Brendan Barnwellbrenb...@brenbarn.netwrote: cs = pyplot.contourf(x,y,z,levels=np.arange(50, 220, 20), cmap=pyplot.cm.jet, extend='both') cs.cmap.set_under('k')

Re: [Matplotlib-users] Why does contourf with the extend argument tweak the data limits?

2012-07-09 Thread Benjamin Root
On Sun, Jul 8, 2012 at 9:04 PM, Brendan Barnwell brenb...@brenbarn.netwrote: I just spent some time debugging an odd problem. Take this code: x,y = np.arange(-10,10), np.arange(-10,10) x,y = np.meshgrid(x,y) z = x**2+y**2 cs = pyplot.contourf(x,y,z,levels=np.arange(50, 220, 20),

Re: [Matplotlib-users] Why does contourf with the extend argument tweak the data limits?

2012-07-09 Thread Brendan Barnwell
On 2012-07-09 06:13, Benjamin Root wrote: On Sun, Jul 8, 2012 at 9:04 PM, Brendan Barnwellbrenb...@brenbarn.netwrote: cs = pyplot.contourf(x,y,z,levels=np.arange(50, 220, 20), cmap=pyplot.cm.jet, extend='both') cs.cmap.set_under('k') cs.set_clim(50, 210) cb = pyplot.colorbar(cs)

Re: [Matplotlib-users] Why does contourf with the extend argument tweak the data limits?

2012-07-09 Thread Eric Firing
On 2012/07/09 7:33 AM, Brendan Barnwell wrote: On 2012-07-09 06:13, Benjamin Root wrote: On Sun, Jul 8, 2012 at 9:04 PM, Brendan Barnwellbrenb...@brenbarn.netwrote: cs = pyplot.contourf(x,y,z,levels=np.arange(50, 220, 20), cmap=pyplot.cm.jet, extend='both') cs.cmap.set_under('k')