4

As Matplotlib seem not to work (what a drag it's such a nice tool) I'am looking for alternatives 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

Most likely with a tool with as less as possible dependencies. Any recommendations are welcome

Thanks!

artwork21
35.2k8 gold badges69 silver badges135 bronze badges
asked Jul 2, 2011 at 19:38
2
  • did you see the addin on code gallery? resources.arcgis.com/gallery/file/arcobjects-net-api/… Commented Jul 4, 2011 at 19:35
  • @Brad principally the idea looks nice but they tool neither seem to be able to be controlled by pythonscripting nor it seem to support any star plots / radar charts. Hopefully in future! Commented Jul 9, 2011 at 9:17

2 Answers 2

1

Built in to arcpy is a series of classes for making graphs, it may be what you need.

What of matplotlib isn't working? I know the TK parts of the UI don't play nice in the UI, but exporting to an image file and using os.startfile should work, or marking the tool to run out of process.

answered Jul 3, 2011 at 0:05
8
  • I know the possibilities of built in of Arcgis and even took into account the use of templates, but as the graph options are still a little weak (of course they got much better in the recent years) I was looking for alternatives. Matplotlib seemed to be the tool that would fit my needs. Unfortunatly I didnt get it run; see also my post at the ESRIForum: forums.arcgis.com/threads/… Commented Jul 3, 2011 at 8:10
  • Furthermore I tried it like you suggested by exporting the graph as a file. Therefore I tried this one: from pylab import * plot ( arange(0,10),[9,4,5,2,3,5,7,12,2,3],'.-',label='sample1' ) plot ( arange(0,10),[12,5,33,2,4,5,3,3,22,10],'o-',label='sample2' ) xlabel('x axis') ylabel('y axis') title('my sample graphs') legend(('sample1','sample2')) savefig("c:\sampleg.png",dpi=(640/8)) Anyway if I run it with ArcGIS I still get the message: <type 'exceptions.ImportError'>: No module named pylab Failed to execute (Script). Commented Jul 3, 2011 at 8:10
  • By the way if I let it run in iPython (same installation) it works perfect. If you have any suggestion how to get it run I will really appreciate this. Thanks! Commented Jul 3, 2011 at 8:10
  • This is interesting because Matplotlib is being bundled with 10.1 and there wasn't much we needed to do to get it working -- I'll see what's up on a 10.0 system. Commented Jul 3, 2011 at 22:36
  • This would be great as the version 10.1 is not shipped out in Germany yet, so I have to find a solution before that. Thanks! Werner Commented Jul 4, 2011 at 10:14
0

I've only used ReportLab for creating Reports as PDF from Python (with ArcGIS 10) but it also has some charting/graphing capabilities: http://www.protocolostomy.com/2008/10/22/generating-reports-with-charts-using-python-reportlab/ (See Section 11.3 in its User Guide)

However, I think you may be looking for more complex graph types than ReportLab has been used for previously.

answered Jul 3, 2011 at 22:41

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.