I have installed matplotlib (v. 1.0.1) which works with iPython quite good.
But if I insert the same script in ArcGIS 10 or Eclipse 3.7.0 (with PyDev) I get always errors. As I consider to use matplotlib to create graphs with ArcGIS Python Scripts developed in Eclipse thats both pretty unfortunate – so far eclipse works quite well for ArcGIS 10.
F.i. I tested this one:
http://matplotlib.sourceforge.net/examples/api/unicode_minus.html
In iPython it works perfect.
In Eclipse I get this error:
import matplotlib.pyplot as plt
ImportError: No module named pyplot
And in ArcGIS I get this one:
Running script Script1…
: bad screen distance "640.0"
Failed to execute (Script1).
Do I still have something to configure?
I have tested several other things and posted in other forums as well (like ESRI). As there seem to be no solution to the problem maybe someone does have a recommendation about which other tool might be suitable to create graphs while running python with ArcGIS 10. Besides regular pie and column charts I need in particular the possibility to create star plots/ radar charts / amoeba diagram – most likely something like:
http://matplotlib.sourceforge.net/examples/pylab_examples/polar_bar.html
Best Answer
I can't be sure, but if you have setuptools, you can use easy_install. It may be as simple as downloading the egg (For some reason I had issues with downloading/installing directly with easy_install) and installing it using your chosen Python interpreter, like so:
C:\Python26\ArcGIS10.0\python.exe -m easy_install C:\Path\To\Egg\matplotlib-1.0.1_r0-py2.6-win32.egg
As long as you have the required dependencies, this should resolve your import error with your specified Python interpreter.
I'm clueless about the "bad screen distance" error.