I can reproduce Thomas' problem with Agg backend. It does not happen
if frame_on is True.
And I guess Thomas' guess in the first email might be right.
I had a quick look at the mpl source and I don't think draw(),  clf()
or savefig() try to clear the canvas.
The problem is not visible if frame_on is True.

Thomas,
Put following line after the savefig() function

   fig.canvas._lastKey = None

and see if it solves the problem (savefig command in your original
email is outside the for loop, I guess this was a typo).

The Agg backend has a clear() method which fills the canvas with (1,
1, 1, 0).  I tried to put this method in a few different places.  It
worked for savefig(), but I couldn't get it work in the interactive
backend (GtkAgg).

Regards,

-JJ


On Fri, Oct 31, 2008 at 6:35 AM, Thomas Pfaff <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Thanks for the quick reply.
>
>
> My OS is Windows XP with Service Pack 3
>
> I'm using an easy-install .egg distribution. Whether I downloaded it
> somewhere or simply installed it using easy-install, I don't remember.
>
> I have another version of matplotlib (0.91.2) installed, which does not seem
> to be used. This one was installed using the Windows installer from the
> matplotlib homepage. This should not interfere, should it?
>
> Running the script with --verbose-helpful gives the following results (I
> removed parts of the path information)
>
> $HOME=\pfaff
> CONFIGDIR=\pfaff\.matplotlib
> matplotlib data path
> \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl
> -data
> loaded rc file
> \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl
> -data\matplotlibrc
> matplotlib version 0.98.3
> verbose.level helpful
> interactive is False
> units is False
> platform is win32
> Using fontManager instance from \pfaff\.matplotlib\fontManager.cache
> backend TkAgg version 8.4
>
>
> Now that I think of it:
> In the IPython reference, I read about possible problems with tk. When
> starting IPython I use -pylab -tk because otherwise I can only do one plot
> and the plotting window hangs once I issue another plotting command.
> As I didn't find where to tell matplotlib to behave like these two switches
> were set, I get by with constantly restarting my interpreter when working
> interactively.
> Could this be part of the problem?
>
> Cheers,
>
>
> Thomas
>
>> -----Original Message-----
>> From: Michael Droettboom [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, October 30, 2008 2:21 PM
>> To: Thomas Pfaff
>> Cc: matplotlib-users@lists.sourceforge.net
>> Subject: Re: [Matplotlib-users] no canvas reinitialization between calls
>> to savefig
>>
>> I can't reproduce this here with SVN trunk.  I get what you expect.
>>
>> Can you provide the information outlined here:
>>
>> http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-
>> problem
>>
>> as well as the backend you are using?
>>
>> Cheers,
>> Mike
>>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to