/usr/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py
> in print_figure(self, filename, dpi, facecolor, edgecolor,
> orientation) 458 svg.print_figure(filename, dpi, facecolor,
> edgecolor, orientation) 459 elif ext.find('ps')>=0 or
> ext.find('ep')>=0:
--> 460 from backend_ps import FigureCanvasPS # lazy import
> 461 ps = self.switch_backends(FigureCanvasPS) 462
> ps.print_figure(filename, dpi, facecolor, edgecolor,
> orientation)
> ImportError: cannot import name FigureCanvasPS
This looks you might have a bad install. I would remove
site-packages/matplotlib and try re-installing cleanly. If the error
persists, make sure that you don't have a copy of backend_ps.py
anywhere in your PYTHONPATH (do 'locate backend_ps' to find out if
there are any errant copies lying around.).
Your example runs fine on my system.
JDH