Hello,

I’m trying to use savefig in my wx app and I’m using wxAgg backend. I’m getting this error:

 

FILE …maplotlib\backends\backend_bases.py, line 397 in print_png

Self.get_renderer()._renderer.write_png(filename, self.figure.dpi.dpi.get())

TypeError: cannot return std::string from Unicode object

 

I’m simply calling this:

 

self.figure.savefig(image_file,

                            facecolor='w',

                            edgecolor='w')

 

How do I fix this problem? Thanks.

 

Jeff