I have an application where I would like to use show in a loop but as stated in 18.1 of the manual that does not work. # WARNING : illustrating how NOT to use show for i in range(10): # make figure i show() So I made a workaround in a custom wxDialog with a wxStaticBitmap and a few buttons and put the matplotlib figure in the bitmap with something like: wi,hi = figure.get_size_inches() width,height = bitmap_plot.GetSize() dpi = int(min(width/wi,height/hi)) figure.savefig('/tmp/tmp.png',dpi = dpi) image = wx.Image('/tmp/tmp.png',wx.BITMAP_TYPE_ANY) bitmap = wx.BitmapFromImage(image) bitmap_plot.SetBitmap(bitmap) Thus scaling the figure using the dpi option of savefig and then loading it into the wxStaticBitmap.
To me it seems there might be a lot of unnecessary data handling. What is the clever solution? mant thanks -- View this message in context: http://www.nabble.com/show-figures-in-a-loop-tp24776045p24776045.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users