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....

Thanks for the help

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
    
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. –  gotanuki Jan 15 '13 at 8:18
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.