On 2004年5月25日 08:38:40 -0500, John Hunter <jdh...@ac...> wrote: >>>>>> "Leon" == Leon Brits <leo...@ne...> writes: > > Leon> Hi, I experience a slowdown in the command canvas.draw(). I > Leon> am drawing a moving bargraph by shifting the x-axis and > Leon> adding a new bar. The new bargraph is added every second, > Leon> but starts to slows down after 5 minutes. > > Leon> I monitored the time it takes to execute the canvas.draw() > Leon> command and this increases from 200ms to over 1 second > Leon> within the 5 minutes and therfore the delay since I am > Leon> trying to display the new bar every second. > > Leon> Any help appreciated! Thnaks Leon > > Could you post your code, or at least the core of it that does the > drawing update? > > JDH I cannot give you everything, but here is the main part.... g_canvas = get_current_fig_manager().canvas < SNIP > # Build stacked bargraph for jin range(data[....]) # Select axes to add BAR too... axes(g_display[j]['axes']['handle']) b = bar(delta_time, h, 1, g_display[j]['offset'], color) g_display[j]['offset'] += h # build stacked bar # setup legend names & colors g_display[j]['bars'].append(b) g_display[j]['legend'].append(data['legend']) < SNIP > # Select axes to update... axes(g_display[j]['axes']['handle']) g_display[j]['maxy'] = Search_YMax(g_display[j]['maxy'], g_display[j]['offset']) g_display[j]['y-scale'] = Scale_YMax(g_display[j]['maxy'][0]) g_display[j]['axes']['handle'].set_ylim([0, g_display[j]['y-scale']]) g_display[j]['axes']['handle'].set_xlim([x_start, x_end]) legend(g_display[j]['bars'], g_display[j]['legend'], 'lower left') ylabel(g_display[j]['unit'], g_font['unit']) g_canvas.draw() Does this help? Should I tell the axes to "not remember" the out-of-view data? Thanks for your quick reply! Cheers Leon -- ============================== Leon J. Brits Netronome Systems (Pty) Ltd. Tel:+27(0)12-6673650 Fax:+27(0)12-6673635