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!

2
  • did you see the addin on code gallery? resources.arcgis.com/gallery/file/arcobjects-net-api/…
    – Brad Nesom
    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!
    – Werner
    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.

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/…
    – Werner
    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).
    – Werner
    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!
    – Werner
    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
    – 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.

Your Answer

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

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