I work matplotlib on wxpython, python2.5.
It is wonderful that the following code work faster than canvas.draw().
            canvas.restore_region(background)     
            ##Updata three lines and draw it.
            line.set_data(x,y)     
            ax.draw_artist(line)                            
            canvas.blit(ax.bbox)                                                
                  
            canvas.gui_repaint()
When I creat a frame and set frame.Show(True). Then ,refresh the line on
canvas with above method. It works.
However,When I creat a frame and set frame.Show(False). Then ,refresh the
line on canvas with above method. It fails. And get the following message.
'''
File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1299, in
draw_artist
    assert self._cachedRenderer is not None
AssertionError
'''
I creat a lot of frames and do not want to show it at frist. However, when
with frame.Show(False), I can refresh the canvas. Is there any solution?
Could anyone help me?  Your help will be appreciated a lot. Thanks.
-- 
View this message in context: 
http://www.nabble.com/AssertionError-On-ax.draw_artist%28%29------tp16790306p16790306.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to