ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Make Graph

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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.
    • Learn more about creating graphs
    • Learn more about creating graph templates
  • 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

arcpy.management.MakeGraph(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

  • Current Workspace

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Graph toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal