Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

Best Werner

share|improve this question
    
Could be a pythonpath issue if you have multiple installations of python. Your eclipse may use a different one. This has always been a headache for me. Make sure your eclipse is configured with the "right" /arcgis-shipped python interpreter (you can set up different ones against different installations and libraries). –  ako Aug 1 '11 at 6:12

3 Answers 3

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.

share|improve this answer

I could be corrected, but I think your issue is that ESRI installs its own version of python, so you have to install matplotlib to python shipped with ESRI products.

share|improve this answer

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

Any recommendations are welcome

Thanks

share|improve this answer
    
Please, only post answers to the question as an answer. This should be added to your original question or as a comment to the question. –  Sean Aug 31 '11 at 12:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.