I think that did it --- thanks Andrew!!

Just out of curiosity, what does 'Agg' refer to? Also, I'm guessing
that some efficiency is lost once we make Python import the entire
library (as opposed to just pyplot as before) -- is there a more
efficient way, or is that just the price to pay?

Either way, thanks a ton!
Tyler

On 4/15/09, Andrew Straw <straw...@astraw.com> wrote:
> Tyler B wrote:
>> Hi there,
>>
>> I am trying to run a python script on my computer at a regular
>> interval [in the background] to output an image file using
>> matplotlib.  My problem is that every time the script runs, it
>> momentarily steals focus from whatever I'm working on -- which over
>> time gets to be very annoying.
>>
>> I think that I've narrowed it down to a single line in the python script:
>> fig = plt.figure(facecolor ='w', frameon=False)
>>
>> [note that I've imported matplotlib.pyplot as plt earlier]
>>
>> I made a short video to show the problem:
>> http://screencast.com/t/MRObeKrx
>>
>> Can anyone think of a good way to prevent matplotlib from stealing
>> focus??  This is the last problem I have to solve.. though I'm out of
>> ideas.
> You don't show the beginning of your script, but try:
>
> import matplotlib
> matplotlib.use('Agg')
>
> before any other MPL imports.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to