From: Darren D. <dd...@co...> - 2007-09-17 17:19:46
|
On Monday 17 September 2007 01:12:46 pm David Montgomery wrote: > I am trying to save a sample graph I created as a jpeg image. It seems > form the documentation that the type of image can be determined by the > extension that is used. Commands seem simple enough. > > ind = arange(len(importance_IncNodePurity)) # the x locations for the > groups width = 0.35 # the width of the bars > p1 = bar(ind, importance_IncNodePurity, width, color='r') > ylabel('Importance') > title('Importance Node Purity') > xticks(ind+width, importance_row_names) > psave="c:\eclipse\dafaf.jpg" > savefig(psave) > show() > > > However, I seem to get the following errors and I have no idea what they > mean. [...] > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 493, in print_figure raise IOError('Do not know know to handle > extension *%s' % ext) > IOError: Do not know know to handle extension *.jpg It means the Agg library, which we use for rendering, does not know how to create jpegs. Can you work with png's instead? They are a much better format for plots and line art than jpegs. Darren |