Make Graph (Data Management)
Summary
Creates a graph as a visual output using a graph template or an existing graph.
Usage
- To use this tool, you first need to create a graph (.grf) or a graph template (.tee), which is used as a template for creating the output graph. This can be done using the Graphing Wizard (found on the ArcMap View menu). The graph or the graph template has all the information about your graph: number of series, functions, axes information, title, and so on.
- The output graph is an in-memory graph that can be added to the host ArcGIS application or can be saved using the Save Graph tool.
- Make Graph can be used on a Windows platform only.
Syntax
MakeGraph_management (in_graph_template_source, in_datasets, out_graph_name)
Parameter | Explanation | Data 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
ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes
10/27/2014