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'm having python produce a multi-series graph. How do you change the series name in the legend, the default being Vertical Bar, Vertical Bar1, Vertical Bar2....

arcpy.MakeGraph_management(graphTemplatePath,'''SERIES=bar:vertical DATA={0} X=ParkUnit Y=Coverage LABEL=ParkUnit SORT=ASC;
                                             SERIES=bar:vertical DATA={1} X=ParkUnit Y=Coverage;
                                             SERIES=bar:vertical DATA={2} X=ParkUnit Y=Coverage;
                                             SERIES=bar:vertical DATA={3} X=ParkUnit Y=Coverage;
                                             SERIES=bar:vertical DATA={4} X=ParkUnit Y=Coverage;
                                             GRAPH=general TITLE={5}, Total Coverage by Unit;
                                             LEGEND=general TITLE=Year Total Coverage;
                                             '''.format(scratchReport + str(year), scratchReport + str(year-1), scratchReport + str(year-2),
                                                        scratchReport + str(year-3), scratchReport + str(year-4), exoticPlant),"graphTemp")
share|improve this question

closed as unclear what you're asking by PolyGeo Feb 6 at 7:09

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

    
I think you might have to do this in the template. I haven't tried this myself but I wonder if you are using the graph in an MXD if it would be possible to access these parameters with arcpy.mapping.ListLayoutElements(). –  dango Jan 14 '13 at 8:56
    
i would take a look at the matplotlib library (matplotlib.org). it includes a much more diverse toolbox for creating nice-looking graphs than ESRI currently offers. further, you have much more control over all the variables, if you take the time to examine some examples on the site to learn how to use it effectively. –  ndimhypervol Jan 15 '13 at 8:18

Browse other questions tagged or ask your own question.