On Sun, Mar 28, 2010 at 11:16 AM, Alan G Isaac <alan.is...@gmail.com> wrote:
> Using contourf in version 0.99.1,
> I'm seeing an unwanted white strip to
> the top and right, adjacent to the axes.
> (In fact, the strip looks just wide
> enough to underlay the ticks.)
>
> Alan Isaac
>
> PS Simple example:
>
> x = np.linspace(-5, 5, 100)
> X, Y = np.meshgrid(x, x)
> Z = np.sin(x*y[:,None])
> fig = plt.figure()
> ax = fig.add_subplot(1,1,1)
> ax.contourf(Z)

Well, in your simple example you're not even using the X and Y you
calculate to give the spatial dimensions of your data,
so it's just using indices, which run from 0 to 99. Since the limits
are 0 to 100, bam...white space because, indeed, there is no data.

If I do the following example, I don't get any whitespace:

x = np.linspace(-5, 5, 100)
X, Y = np.meshgrid(x, x)
Z = np.sin(x*x[:,None]) #Note change from bug in previous ex.
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.contourf(X, Y, Z)
ax.set_xlim(-5, 5)
ax.set_ylim(-5, 5)
plt.draw()

Is there something I'm missing? (Running SVN trunk here)

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to