Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Eric Emsellem <emsellem@ob...>  20050621 18:22:32

Hi, for some reason I have now (with the new matplotlib) problems with ps files saving figures with savefig. (it works with gif, jpg, etc). [I am running Python 2.3.4, IPython 0.6.12, matplotlib 0.82 and verbose.level helpful, interactive is False, platform is linux2, numerix numarray 1.3.0] So here is what I get with a simple example: scatter(arange(0,10,1), arange(10,20,1)) savefig('toto.ps')  exceptions.ImportError Traceback (most recent call last) /home/science/Sauron/AnalysisKin/Paper7/<console> /usr/lib/python2.3/sitepackages/matplotlib/pylab.py in savefig(*args, **kwargs) 749 def savefig(*args, **kwargs): 750 fig = gcf() > 751 return fig.savefig(*args, **kwargs) 752 if Figure.savefig.__doc__ is not None: 753 savefig.__doc__ = Figure.savefig.__doc__ /usr/lib/python2.3/sitepackages/matplotlib/figure.py in savefig(self, *args, **kwargs) 616 kwargs[key] = rcParams['savefig.%s'%key] 617 > 618 self.canvas.print_figure(*args, **kwargs) 619 620 /usr/lib/python2.3/sitepackages/matplotlib/backends/backend_gtkagg.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation) 114 try: agg.print_figure(filename, dpi, facecolor, edgecolor, orientation) 115 except IOError, msg: > 116 error_msg_gtk('Failed to save\nError message: %s'%(msg,), self) 117 118 self.figure.set_canvas(self) /usr/lib/python2.3/sitepackages/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 ANY HELP welcome!!! Thanks Eric  =============================================================== Observatoire de Lyon emsellem@... 9 av. CharlesAndre tel: +33 4 78 86 83 84 69561 SaintGenis Laval Cedex fax: +33 4 78 86 83 86 France http://wwwobs.univlyon1.fr/eric.emsellem =============================================================== 
From: Eric Emsellem <emsellem@ob...>  20050622 15:03:55

followed what you suggested, everything was fine until the 'grep' : for some obscure reason every new install produced an empty (0 byte) backend_ps.py file (I think this may have come from a previously interrupted 'build'). I therefore erased the original matplotlib source dir (as well as the installed ones), and redetared the archive starting from scratch.. It works... thanks a lot for the support!!!! Eric John Hunter wrote: >>>>>>"Eric" == Eric Emsellem <emsellem@...> writes: >>>>>> >>>>>> > > Eric> Thanks for the tip, but as you and John suggested I tried a > Eric> new clean installation (both for matplotlib  removing the > Eric> sitepackages and /usr/share matplotlib dir  and ipython) > Eric> but the small test I sent you still react the same. The > Eric> specific import command: > > Eric> from matplotlib.backends.backend_ps import FigureCanvasPS > > Eric> does indeed give an ImportError: > > Eric> ImportError: cannot import name FigureCanvasPS > > Eric> not sure what to do now. Thanks for any input there! > >Strange indeed. Issue these commands and let me know what you find > > >>> import matplotlib.backends.backend_ps > >>> matplotlib.__file__ > '/usr/lib/python2.4/sitepackages/matplotlib/__init__.pyc' > >>> matplotlib.backends.backend_ps.__file__ > '/usr/lib/python2.4/sitepackages/matplotlib/backends/backend_ps.pyc' > > >>> import matplotlib > >>> matplotlib.__version__ > '0.82' > >>> matplotlib.__file__ > '/usr/lib/python2.4/sitepackages/matplotlib/__init__.pyc' > > >Also, what do these commands from the unix shell return (substituting >in your path to backend_ps.py) > > pedspc311:~> md5sum /usr/lib/python2.4/sitepackages/matplotlib/backends/backend_ps.py > 2bb2161d70c11f56e803d7749b4fe05a /usr/lib/python2.4/sitepackages/matplotlib/backends/backend_ps.py > pedspc311:~> grep '^class FigureCanvas' /usr/lib/python2.4/sitepackages/matplotlib/backends/backend_ps.py > class FigureCanvasPS(FigureCanvasBase): > >The only things I can think of are > > 1) you have an errant copy of matplotlib.backends.backend_ps > somewhere in your path > > 2) you have a corrupted backend_ps (hence the md5sum check) > > 3) You did not successfully remove sitepackages/matplotlib and have > a corrupt install. > >JDH > > >  =============================================================== Observatoire de Lyon emsellem@... 9 av. CharlesAndre tel: +33 4 78 86 83 84 69561 SaintGenis Laval Cedex fax: +33 4 78 86 83 86 France http://wwwobs.univlyon1.fr/eric.emsellem =============================================================== 
From: John Hunter <jdhunter@ac...>  20050622 15:08:00

>>>>> "Eric" == Eric Emsellem <emsellem@...> writes: Eric> followed what you suggested, everything was fine until the Eric> 'grep' : for some obscure reason every new install produced Eric> an empty (0 byte) backend_ps.py file (I think this may have Eric> come from a previously interrupted 'build'). I therefore Eric> erased the original matplotlib source dir (as well as the Eric> installed ones), and redetared the archive starting from Eric> scratch.. It works... Oh  both Darren and I forgot to suggest rm rf "build" in addition to sitepackages/matplotlib. This is, however, suggested in http://matplotlib.sourceforge.net/faq.html#FAILURE The first thing to try is to remove sitepackages/matplotlib and reinstall. If you are running the windows installer or using some other package, that is all you need to do. If you are compiling matplotlib yourself, you also need to remove the build subdirectory of the matplotlib src tree you are compiling from. It is not enough to do python setup.py clean. Try rebuilding and reinstalling matplotlib after removing these two directories and see if that helps. If Glad you found and fixed the problem! JDH 
From: Eric Emsellem <emsellem@ob...>  20050701 09:23:36

Hi, a short report on 2 minor problems I face with matplotlib:  I tried to save a figure in gif. It gave me back an error message saying that basically this is not supported. This is fine of course. However, then the plot window crashed, and then the whole Ipython session. It would be useful then to have this error not affecting the session in this way if possible.  I also noticed recently that when I had a plot made with matplotlib, and changing desktop (I am running under Linux and KDE), when I come back to the panel where my matplotlib session is, the plot is often (but not every time) "perturbed": the figure is zoomed in some corner, or offseted. I am not sure why this occurs, and this could be something specific to my setting, but just to report the problem, if this is a more general item (I have no clue what triggers this since it does not occur systematically, which I understand does not ease the debugging...:) Cheers Eric (and thanks for all this hard work. to repeat myself once more, matplotlib is just amazing!)  =============================================================== Observatoire de Lyon emsellem@... 9 av. CharlesAndre tel: +33 4 78 86 83 84 69561 SaintGenis Laval Cedex fax: +33 4 78 86 83 86 France http://wwwobs.univlyon1.fr/eric.emsellem =============================================================== 
From: Fernando Perez <Fernando.P<erez@co...>  20050701 17:16:30

Eric Emsellem wrote: > Hi, > a short report on 2 minor problems I face with matplotlib: > >  I tried to save a figure in gif. It gave me back an error message > saying that basically this is not supported. This is fine of course. > However, then the plot window crashed, and then the whole Ipython > session. It would be useful then to have this error not affecting the > session in this way if possible. I can see the problem in the GTK backend, but all other backends I tried under linux (TkAgg, QtAgg and WXAgg) all behave correctly. This seems like a bug in the GTK backend to me: it puts out to the screen an error message box, but the OK button in that box is unresponsive. Eventually the window manager just kills the window, which brings the whole python process down with it. I don't know the backends enough to know what the right solution should be here. Cheers, f 
From: Eric Emsellem <emsellem@ob...>  20050701 09:27:24

Hi again, regarding the problem of "perturbed plot" I mentioned, I found out some systematic behaviour:  I plot something  I save it into a jpg  I get the cursor into the window and there it gets nuts... scatter([0,1],[0,1]) savefig('toto.jpg') ==> then put the cursor in the plot window.... and this is systematic (so this does not seem linked to a change in the desktop finally) Eric  =============================================================== Observatoire de Lyon emsellem@... 9 av. CharlesAndre tel: +33 4 78 86 83 84 69561 SaintGenis Laval Cedex fax: +33 4 78 86 83 86 France http://wwwobs.univlyon1.fr/eric.emsellem =============================================================== 
From: Eric Emsellem <emsellem@ob...>  20050719 09:18:50

Hi, I know this may be a question for scipy or numarray but since matplotlib is using something close to what I wish to have..., here is the question:  I would like to use some 2D interpolation of a set of x, y, z points (not regularly positioned). If possible I would like to test various interpolation schemes (bilinear, splines, etc), and have a FLAG to tell me if I am trying to EXTRAPOLATE (so that I can control the output). I looked at scipy but this is really bad: as far as I understand the doc mentions that it takes 1D array (what I want), but in fact works on 2D arrays (NOT what I want).... (and it only provides splines) I know that imshow has this built in with many different options for the visualisation. So how is this done? Is it hard coded in one of the matplotlib routine ? Could not find it there... thanks for the help Eric Emsellem  =============================================================== Observatoire de Lyon emsellem@... 9 av. CharlesAndre tel: +33 4 78 86 83 84 69561 SaintGenis Laval Cedex fax: +33 4 78 86 83 86 France http://wwwobs.univlyon1.fr/eric.emsellem =============================================================== 
From: Andrew Straw <strawman@as...>  20050719 15:59:10

On Jul 19, 2005, at 2:17 AM, Eric Emsellem wrote: >  I would like to use some 2D interpolation of a set of x, y, z points > (not regularly positioned). If possible I would like to test various > interpolation schemes (bilinear, splines, etc), and have a FLAG to > tell me if I am trying to EXTRAPOLATE (so that I can control the > output). I looked at scipy but this is really bad: as far as I > understand the doc mentions that it takes 1D array (what I want), but > in fact works on 2D arrays (NOT what I want).... (and it only provides > splines) You have at least 2 general approaches: Delaunay triangulation and splines. Straight Delaunay triangulation would be linear interpolation, but can be embellished with fancier interpolation techniques. As far as I know, Delaunay triangulation and associated interpolation routines are not (yet) available in scipy. Surface splines are available in scipy  check out bisplrep/bisplev. As far as a FLAG to tell if you want to EXTRAPOLATE, I don't know. They may not be in ALL CAPS, either, so read the fine print. :) > I know that imshow has this built in with many different options for > the visualisation. So how is this done? Is it hard coded in one of the > matplotlib routine ? Could not find it there... I don't think imshow does anything as fancy as what you suggest. The contour routines are more sophisticated and may be useful to you, but I haven't followed how they work. 
From: Chris Barker <Chris.B<arker@no...>  20050719 20:48:25

Andrew Straw wrote: > You have at least 2 general approaches: Delaunay triangulation and > splines. Straight Delaunay triangulation would be linear interpolation, > but can be embellished with fancier interpolation techniques. As far as > I know, Delaunay triangulation and associated interpolation routines are > not (yet) available in scipy. I don't think they are. I've been planning to write python wrappers for Jonathan Shewchuk's triangle code, but if someone wanted to beat me to it.... http://www2.cs.cmu.edu/~quake/triangle.html > Surface splines are available in scipy  > check out bisplrep/bisplev. Can you do surface splines with irregularly spaced points? > The > contour routines are more sophisticated and may be useful to you, but I > haven't followed how they work. I'm pretty sure they require regularly spaced points as well. Or at least "logically Cartesian" points. Chris  Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 5266959 voice 7600 Sand Point Way NE (206) 5266329 fax Seattle, WA 98115 (206) 5266317 main reception Chris.Barker@... 
From: Eric Emsellem <emsellem@ob...>  20050719 16:46:01

Hi thanks for the input, however scipy interpolation scheme is on a regular grid. The positions I have are not even on an ORTHOGONAL grid: they are randomly distributed! So I have a set of x,y random positions with Z values and I wish to know the interpolated value at a new position xnew, ynew... It seems that this does not exist in scipy. Someone pointed out Scientific Python but this again does not work (using irregular but orthogonal grids)... This would be pretty bad if I cannot do this in python!!! Any help welcome! Cheers Eric Eric Emsellem wrote: > Hi, > > I know this may be a question for scipy or numarray but since > matplotlib is using something close to what I wish to have..., here is > the question: > >  I would like to use some 2D interpolation of a set of x, y, z points > (not regularly positioned). If possible I would like to test various > interpolation schemes (bilinear, splines, etc), and have a FLAG to > tell me if I am trying to EXTRAPOLATE (so that I can control the > output). I looked at scipy but this is really bad: as far as I > understand the doc mentions that it takes 1D array (what I want), but > in fact works on 2D arrays (NOT what I want).... (and it only provides > splines) > > I know that imshow has this built in with many different options for > the visualisation. So how is this done? Is it hard coded in one of the > matplotlib routine ? Could not find it there... > > thanks for the help > > Eric Emsellem > >On Jul 19, 2005, at 2:17 AM, Eric Emsellem wrote: > > >  I would like to use some 2D interpolation of a set of x, y, z points > > (not regularly positioned). If possible I would like to test various > > interpolation schemes (bilinear, splines, etc), and have a FLAG to > > tell me if I am trying to EXTRAPOLATE (so that I can control the > > output). I looked at scipy but this is really bad: as far as I > > understand the doc mentions that it takes 1D array (what I want), but > > in fact works on 2D arrays (NOT what I want).... (and it only provides > > splines) > > You have at least 2 general approaches: Delaunay triangulation and > splines. Straight Delaunay triangulation would be linear interpolation, > but can be embellished with fancier interpolation techniques. As far > as I know, Delaunay triangulation and associated interpolation routines > are not (yet) available in scipy. Surface splines are available in > scipy  check out bisplrep/bisplev. > > As far as a FLAG to tell if you want to EXTRAPOLATE, I don"t know. > They may not be in ALL CAPS, either, so read the fine print. :) > > > I know that imshow has this built in with many different options for > > the visualisation. So how is this done? Is it hard coded in one of the > > matplotlib routine ? Could not find it there... > > I don"t think imshow does anything as fancy as what you suggest. The > contour routines are more sophisticated and may be useful to you, but I > haven"t followed how they work. > > >  =============================================================== Observatoire de Lyon emsellem@... 9 av. CharlesAndre tel: +33 4 78 86 83 84 69561 SaintGenis Laval Cedex fax: +33 4 78 86 83 86 France http://wwwobs.univlyon1.fr/eric.emsellem =============================================================== 
From: Peter Groszkowski <pgroszko@ge...>  20050719 18:08:41

I do this in python/matplotlib using hardy's multiquadric interpolation.... I've posted here before promising to attach some code, but haven't done so yet, since really need to clean things up a little. Will try to get it done on my 10 hour flight tonight... and post within the next few days... Cheers, Peter Eric Emsellem wrote: > Hi > thanks for the input, however scipy interpolation scheme is on a > regular grid. > > The positions I have are not even on an ORTHOGONAL grid: they are > randomly distributed! > So I have a set of x,y random positions with Z values and I wish to > know the interpolated value > at a new position xnew, ynew... > > It seems that this does not exist in scipy. Someone pointed out > Scientific Python but this again does not work > (using irregular but orthogonal grids)... > > This would be pretty bad if I cannot do this in python!!! > > Any help welcome! > > Cheers > Eric > > Eric Emsellem wrote: > >> Hi, >> >> I know this may be a question for scipy or numarray but since >> matplotlib is using something close to what I wish to have..., here >> is the question: >> >>  I would like to use some 2D interpolation of a set of x, y, z >> points (not regularly positioned). If possible I would like to test >> various interpolation schemes (bilinear, splines, etc), and have a >> FLAG to tell me if I am trying to EXTRAPOLATE (so that I can control >> the output). I looked at scipy but this is really bad: as far as I >> understand the doc mentions that it takes 1D array (what I want), but >> in fact works on 2D arrays (NOT what I want).... (and it only >> provides splines) >> >> I know that imshow has this built in with many different options for >> the visualisation. So how is this done? Is it hard coded in one of >> the matplotlib routine ? Could not find it there... >> >> thanks for the help >> >> Eric Emsellem >> >> On Jul 19, 2005, at 2:17 AM, Eric Emsellem wrote: >> >> >  I would like to use some 2D interpolation of a set of x, y, z >> points > (not regularly positioned). If possible I would like to test >> various > interpolation schemes (bilinear, splines, etc), and have a >> FLAG to > tell me if I am trying to EXTRAPOLATE (so that I can >> control the > output). I looked at scipy but this is really bad: as >> far as I > understand the doc mentions that it takes 1D array (what I >> want), but > in fact works on 2D arrays (NOT what I want).... (and it >> only provides > splines) >> >> You have at least 2 general approaches: Delaunay triangulation and >> splines. Straight Delaunay triangulation would be linear >> interpolation, but can be embellished with fancier interpolation >> techniques. As far as I know, Delaunay triangulation and associated >> interpolation routines are not (yet) available in scipy. Surface >> splines are available in scipy  check out bisplrep/bisplev. >> >> As far as a FLAG to tell if you want to EXTRAPOLATE, I don"t know. >> They may not be in ALL CAPS, either, so read the fine print. :) >> >> > I know that imshow has this built in with many different options >> for > the visualisation. So how is this done? Is it hard coded in one >> of the > matplotlib routine ? Could not find it there... >> >> I don"t think imshow does anything as fancy as what you suggest. The >> contour routines are more sophisticated and may be useful to you, but >> I haven"t followed how they work. >> >> >> >  Peter Groszkowski Gemini Observatory Tel: +1 808 9742509 670 N. A'ohoku Place Fax: +1 808 9359235 Hilo, Hawai'i 96720, USA 
From: Jeff Whitaker <jswhit@fa...>  20050719 21:17:56

Eric Emsellem wrote: > Hi, > > I know this may be a question for scipy or numarray but since > matplotlib is using something close to what I wish to have..., here is > the question: > >  I would like to use some 2D interpolation of a set of x, y, z points > (not regularly positioned). If possible I would like to test various > interpolation schemes (bilinear, splines, etc), and have a FLAG to > tell me if I am trying to EXTRAPOLATE (so that I can control the > output). I looked at scipy but this is really bad: as far as I > understand the doc mentions that it takes 1D array (what I want), but > in fact works on 2D arrays (NOT what I want).... (and it only provides > splines) > > I know that imshow has this built in with many different options for > the visualisation. So how is this done? Is it hard coded in one of the > matplotlib routine ? Could not find it there... > > thanks for the help > > Eric Emsellem > Eric: There are a couple of modules in CDAT (http://cdat.sf.net) to do this. See http://rainbow.llnl.gov/software/cdat/support/cdat_utilities/cdat_utilities3.php Look for the 'ngmath' module. I've found that ngmath.natgrid works quite well. Here's a quick description from the docstring: "natgrid  a twodimensional random data interpolation package based on Dave Watson's nngridr." Jeff  Jeffrey S. Whitaker Phone : (303)4976313 Meteorologist FAX : (303)4976449 NOAA/OAR/CDC R/CDC1 Email : Jeffrey.S.Whitaker@... 325 Broadway Office : Skaggs Research Cntr 1D124 Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg 
From: Darren Dale <dd55@co...>  20050621 18:43:46
Attachments:
Message as HTML

Hi Eric, On Tuesday 21 June 2005 11:16 am, Eric Emsellem wrote: > for some reason I have now (with the new matplotlib) problems with ps > files saving figures with savefig. > (it works with gif, jpg, etc). > > [I am running Python 2.3.4, IPython 0.6.12, matplotlib 0.82 > and =A0verbose.level helpful, interactive is False, platform is linux2, > numerix numarray 1.3.0] > > So here is what I get with a simple example: > > scatter(arange(0,10,1), arange(10,20,1)) > savefig('toto.ps') I didnt have any trouble with this example. Your traceback shows backend_ag= g=20 cant import FigureCanvasPS. Does this work in ipython? from matplotlib.backends.backend_ps import FigureCanvasPS Did you try to removing the matplotlib directory in sitepackages, and=20 reinstalling? =2D=20 Darren S. Dale Bard Hall Department of Materials Science and Engineering Cornell University Ithaca, NY. 14850 dd55@... http://people.ccmr.cornell.edu/~dd55/ 
From: Eric Emsellem <emsellem@ob...>  20050622 07:25:13

Thanks for the tip, but as you and John suggested I tried a new clean installation (both for matplotlib  removing the sitepackages and /usr/share matplotlib dir  and ipython) but the small test I sent you still react the same. The specific import command: from matplotlib.backends.backend_ps import FigureCanvasPS does indeed give an ImportError: ImportError: cannot import name FigureCanvasPS not sure what to do now. Thanks for any input there! Eric Darren Dale wrote: >Hi Eric, > >On Tuesday 21 June 2005 11:16 am, Eric Emsellem wrote: > > >>for some reason I have now (with the new matplotlib) problems with ps >>files saving figures with savefig. >>(it works with gif, jpg, etc). >> >>[I am running Python 2.3.4, IPython 0.6.12, matplotlib 0.82 >>and verbose.level helpful, interactive is False, platform is linux2, >>numerix numarray 1.3.0] >> >>So here is what I get with a simple example: >> >>scatter(arange(0,10,1), arange(10,20,1)) >>savefig('toto.ps') >> >> > >I didnt have any trouble with this example. Your traceback shows backend_agg >cant import FigureCanvasPS. Does this work in ipython? > >from matplotlib.backends.backend_ps import FigureCanvasPS > >Did you try to removing the matplotlib directory in sitepackages, and >reinstalling? > > >  =============================================================== Observatoire de Lyon emsellem@... 9 av. CharlesAndre tel: +33 4 78 86 83 84 69561 SaintGenis Laval Cedex fax: +33 4 78 86 83 86 France http://wwwobs.univlyon1.fr/eric.emsellem =============================================================== 
From: John Hunter <jdhunter@ac...>  20050622 14:45:28

>>>>> "Eric" == Eric Emsellem <emsellem@...> writes: Eric> Thanks for the tip, but as you and John suggested I tried a Eric> new clean installation (both for matplotlib  removing the Eric> sitepackages and /usr/share matplotlib dir  and ipython) Eric> but the small test I sent you still react the same. The Eric> specific import command: Eric> from matplotlib.backends.backend_ps import FigureCanvasPS Eric> does indeed give an ImportError: Eric> ImportError: cannot import name FigureCanvasPS Eric> not sure what to do now. Thanks for any input there! Strange indeed. Issue these commands and let me know what you find >>> import matplotlib.backends.backend_ps >>> matplotlib.__file__ '/usr/lib/python2.4/sitepackages/matplotlib/__init__.pyc' >>> matplotlib.backends.backend_ps.__file__ '/usr/lib/python2.4/sitepackages/matplotlib/backends/backend_ps.pyc' >>> import matplotlib >>> matplotlib.__version__ '0.82' >>> matplotlib.__file__ '/usr/lib/python2.4/sitepackages/matplotlib/__init__.pyc' Also, what do these commands from the unix shell return (substituting in your path to backend_ps.py) pedspc311:~> md5sum /usr/lib/python2.4/sitepackages/matplotlib/backends/backend_ps.py 2bb2161d70c11f56e803d7749b4fe05a /usr/lib/python2.4/sitepackages/matplotlib/backends/backend_ps.py pedspc311:~> grep '^class FigureCanvas' /usr/lib/python2.4/sitepackages/matplotlib/backends/backend_ps.py class FigureCanvasPS(FigureCanvasBase): The only things I can think of are 1) you have an errant copy of matplotlib.backends.backend_ps somewhere in your path 2) you have a corrupted backend_ps (hence the md5sum check) 3) You did not successfully remove sitepackages/matplotlib and have a corrupt install. JDH 
From: John Hunter <jdhunter@ac...>  20050621 18:45:28

>>>>> "Eric" == Eric Emsellem <emsellem@...> writes: Eric> /usr/lib/python2.3/sitepackages/matplotlib/backends/backend_agg.py Eric> in print_figure(self, filename, dpi, facecolor, edgecolor, Eric> orientation) 458 svg.print_figure(filename, dpi, facecolor, Eric> edgecolor, orientation) 459 elif ext.find('ps')>=0 or Eric> ext.find('ep')>=0: > 460 from backend_ps import FigureCanvasPS # lazy import Eric> 461 ps = self.switch_backends(FigureCanvasPS) 462 Eric> ps.print_figure(filename, dpi, facecolor, edgecolor, Eric> orientation) Eric> ImportError: cannot import name FigureCanvasPS This looks you might have a bad install. I would remove sitepackages/matplotlib and try reinstalling 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 
Sign up for the SourceForge newsletter:
No, thanks