On Tue, Feb 23, 2010 at 6:45 PM, David Goldsmith
<d_l_goldsm...@yahoo.com> wrote:
> 1) why doesn't this:
>
>>>> for cmap in dir(cm):
>>>>    try:
>>>>        ax.imshow(image, cmap)
>>>>        canvas.print_figure('image_'+cmap)
>>>>    except:
>>>>        pass
>
> "work" (i.e., simply bypass those elements of dir(cm) which cause imshow to 
> raise an exception, but then continue on as if nothing had happened)?  Is 
> this a bug?
>

I believe this happens because you never clear your figure (or axes)
between print_figure.
imshow does not erase an existing image and you end up with bunch of
images overlapped.
And the exceptions are keep being raised as the image you created with
cmap="LUTSIZE" is still there.

calling ax.cla() before ax.imshow works for me.

Regards,

-JJ

------------------------------------------------------------------------------
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