hi Mike,
It only prints what is between the ----, ----- . I tend to think it is 
related to Tkinter.

I'm using the default GTKAgg.

I have generated over 1500 images using the simple example with no 
issue. When it is in the larger app, it fails on the 2nd or 3rd request.

I'm trying
    reload(matplotlib)
    matplotlib.use('TkAgg')

Are there some python flags I can use when running the script to get 
more verbose output?  I've used -v and -d and get the cleanup list, is 
that useful?

thanks

Michael Droettboom wrote:
> Can you provide the full traceback for the error?  Are there no Python 
> line numbers etc.?
>
> I don't see the string "Fail to allocate bitmap" or "Unable to free 
> colormap..." anywhere in the matplotlib source, so it's hard to say 
> where it's coming from.  I suspect they are coming from the GUI 
> framework you are using...
>
> If you put your simple example inside of a loop, does the error 
> eventually occur -- or only within the context of your app?  If the 
> latter, we'll need to somehow narrow it down to a specific setting or 
> method that causes the problem.
>
> Also, what backend are you using when it breaks?  Just Agg, or one of 
> the Gui+Agg backends?
>
> Cheers,
> Mike
>
> Chris Kennedy wrote:
>> hi,
>> I get this error when I'm generating numerous .png files using 
>> matplotlib 0.9.2 in py2.4 on WinXP
>> -----------------------------
>> Fail to allocate bitmap
>>
>> This application has requested the Runtime to terminate it in an 
>> unusual way.
>> Please contact the application's support team for more information.
>> Unable to free colormap, palette is still selected.
>>
>> This application has requested the Runtime to terminate it in an 
>> unusual way.
>> Please contact the application's support team for more information.
>> -----------------------------
>>
>> The code is simple:
>>         import matplotlib
>>         import matplotlib.pyplot as pylab
>>
>>         pylabFigure = pylab.figure()
>>         pylabFigure.clf()
>>         pylab.rcdefaults()
>>         pylab.plot(p[0::2], p[1::2], 'b-', linewidth=3)
>>         pylab.title('Endpointing Plot for '+StepMillName)
>>         pylab.xlabel('Mill Distance ('+m_unit+')')
>>         pylab.ylabel('~ Electron response ~' )
>>         pylab.grid(True)
>>         pylabFigure.savefig('EPP_'+StepMillName+'.png', 
>> facecolor='lightgrey', edgecolor='w')
>>         pylab.close('all')
>>         pylabFigure = None
>>
>> I can put this code in a simple program and generate many images 
>> without seeing the allocate bitmap error.
>>
>> Perhaps it is colliding with something else in my main app. Is there 
>> a command that can clear, flush, or unselect the palette and/or 
>> colormap?
>>
>> I don't see the allocate error if I switch the backend to 'SVG', that 
>> has it own set of issues though: telling me it can't use, but then 
>> generating SVG files anyway.
>>
>> thanks
>>
>

-- 
Chris Kennedy                  http://www.coventor.com
Sr. Product Manager            Ph: 919-854-7500 x156
Cary, NC                       Fx: 919-854-7501
                           Mobile: 919-414-6653
                           
                           



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to