Save Graph (Data Management)
Saves a graph to an image, vector, or graph file.
- Using this tool you can save a graph as a graph file (.grf) or as one of the image and vector formats below.
Export formats for graphs
Windows Bitmap (.bmp)
Scalable Vector Graphics (.svg)
Adobe Acrobat PDF (.pdf)
Encapsulated PostsScript (.eps)
Portable Network Graphic (.png)
Enhanced Metafile (.emf)
Windows Metafile (.wmf)
When saving the graph to the desired format, you need to specify the file extension in the output file name. For example, if you want to export a graph to a Windows Bitmap, you need to specify the output file name as C:\temp\outGraph.bmp.
- This tool will not work on a non-Windows platform.
Input graph name or location.
You can input the location of an existing graph file (*.grf).
However, when you are using the tool in an ArcGIS application (ArcMap, ArcGlobe, or ArcScene), you can either input a graph present in the ArcGIS document or you can input the location of an existing graph file (*.grf).
The output image, vector, or graph file.
The supported image and vector formats are:
The width of the output image in pixels.
The height of the output image in pixels.
Save a graph as a Windows Bitmap image.
# Name: SaveGraph_ExampleBMP.py # Description: Save a graph as an image # Import system modules import arcpy from arcpy import env # Set environment settings env.workspace = "c:/temp" #Set local variables graph_grf = "us_pop_2003.grf" outputFile = "outgraph.bmp" #Execute SaveGraph arcpy.SaveGraph_management(graph_grf, outputFile, "MAINTAIN_ASPECT_RATIO")