Resumen
Graph templates allow you to create graphs from different datasets that have the same basic structure. The template file contains all the information necessary to create those graphs, except the actual data. Once the template is loaded, you can specify the particular data source you want to use.
Debate
Template files are maintained in a folder called GraphTemplates, which can be in two places in an ArcGIS installation. One location for the GraphTemplates folder is under the ArcGIS installation, the second is within the application data folders for Windows.
Sintaxis
GraphTemplate (templateName)
Parámetro | Explicación | Tipo de datos |
templateName | The graph template (.tee) used to construct the graph template. By default, uses default.tee. | String |
Muestra de código
GraphTemplate example
Create a graph using a graph template.
import arcpy
input_data = 'c:/data/portland.gdb/downtown'
out_graph = 'portland_graph'
out_grf = 'c:/output/downtown_graph.grf'
graph = arcpy.Graph()
graph.addSeriesBarVertical(input_data, 'Value')
arcpy.MakeGraph_management(arcpy.GraphTemplate(), graph, out_graph)
arcpy.SaveGraph_management(out_graph, out_grf)