Select to view content in your preferred language

arcpy.MakeGraph_management in Python - text case issue

2427
4
05-08-2012 03:45 PM
ChrisEnrico
Emerging Contributor
I have the following Python code that generates information for feeding a graph template. Title, sub-title and so on appear as lower case in the final chart. The input is typically upper-lower. I want the text to appear as fed to the template.

Any ideas? Thanks.

    
arcpy.MakeGraph_management(inputGraphTemplate, \
     "SERIES=bar:horizontal DATA=" + str(newDataSource) + \
     " X=PERCENT_STATEFC" + \
     " Y=" + str(mySummaryField) + \
     " LABEL=" + str(mySummaryField) + \
     " SORT=ASC;" + \
     " SERIES=bar:horizontal DATA=" + str(newDataSource) + \
     " X=PERCENT_LOCALSR" + \
     " Y=" + str(mySummaryField) + \
     " LABEL=" + \
     " SORT=ASC;" + \
     " GRAPH=general"+ \
     " TITLE=" + GraphTitle + \
     " SUBTITLE=" + GraphSubTitle, outputGraphName)
Tags (2)
0 Kudos
4 Replies
NickJones
Emerging Contributor
I'm having this issue too.  Have you found a way to get around it?

Thanks,

Nick
0 Kudos
KimOllivier
Honored Contributor
I found that the graphs work well for simple tasks but are hard to customise or generalise.

For more flexibility you might like to try a python module matplotlib http://matplotlib.sourceforge.net/. You do have to move the data to a numpy array, but there are tools for that.
0 Kudos
ChrisEnrico
Emerging Contributor
I'm having this issue too.  Have you found a way to get around it?

Thanks,

Nick




Not yet. Working on getting tables and code together so I can open a ticket with ESRI.
0 Kudos
ChrisEnrico
Emerging Contributor
I found that the graphs work well for simple tasks but are hard to customise or generalise.

For more flexibility you might like to try a python module matplotlib http://matplotlib.sourceforge.net/. You do have to move the data to a numpy array, but there are tools for that.



Thanks. One issue with making use of non-standard ESRI supplied add-ons is the code will be shared. I'd have to work with our IT department to have this installed for all GIS users. Not sure I want to go that direction right now.
0 Kudos