Make Graph (Data Management)

License Level:BasicStandardAdvanced

Summary

Creates a graph as a visual output using a graph template or an existing graph.

Usage

Syntax

MakeGraph_management (in_graph_template_source, in_datasets, out_graph_name)
ParameterExplanationData Type
in_graph_template_source

The input graph template (.tee) or graph file (.grf).

Graph ; File
in_datasets

The input data for individual series in the graph. The input data varies based on the graph type. To facilitate populating the parameters used for creating the graph series from Python, you can use the Graph class.

Graph Data Table
out_graph_name

The name of the graph to be created.

Graph

Code Sample

MakeGraph example (stand-alone script)

Create a vertical bar graph using an existing graph or graph template.

# Name: MakeGraph_ExampleVerticalBar.py
# Description: Creates a graph based on an existing graph or graph template
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env
 
# Set environment settings
env.workspace = "c:/data"

# Set local variables
graph_grf = "input_VerticalBar.grf"

# Execute MakeGraph to create a Vertical Bar graph
arcpy.MakeGraph_management(graph_grf,"SERIES=bar:vertical " + \
                           "DATA=c:/data.gdb/DischargeLevels " + \
                           "X=Hours Y=Flow LABEL=Hours SORT=ASC;" + \
                           "GRAPH=general TITLE=Discharge FOOTER=Station;" + \
                           "LEGEND=general TITLE=Discharge;" + \
                           "AXIS=left TITLE=Discharge;AXIS=right;" + \
                           "AXIS=bottom TITLE=Hours;AXIS=top",
                           "outgraph_Discharge")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013