# Import system modules import arcpy from arcpy import env # Set environment settings env.workspace = "c:/reacch/graphs" # Set local variables output_graph_name = "1910precip" verticalBarGraph_bmp = "C:/reacch/graphs/1910precip.bmp" graph_grf = "standard_bar.tee" inputData = "C:/reacch/climate maps/precip1910" # Create the graph graph = arcpy.Graph() # Add a vertical bar series to the graph graph.addSeriesBarVertical(inputData, "COUNT") # Execute MakeGraph to create a Vertical Bar graph arcpy.MakeGraph_management(graph_grf,graph,"Precip") arcpy.SaveGraph_management(output_graph_name, verticalBarGraph_bmp)
import arcpy # Set local variables: inputTemplate = "C:/reacch/graphs/VerticalBarTemplate.tee" inputdata=arcpy.GetParameterAsText(0) # Add a vertical bar series to the graph graph= arcpy.Graph() graph.addSeriesBarVertical(inputdata, "POP2000") # Output a graph, which is created in-memory arcpy.MakeGraph_management(inputTemplate, graph, "city_pop") arcpy.AddMessage("here") # Save the graph as an image arcpy.SaveGraph_management("city_pop","C:/reacch/graphs/city_pop.jpg")
Hello,
I am attempting to learn how to make a graph using arcpy. I created a vertical bar template and I am trying to make a bar graph of some precipitation data. I keep getting an error of "<class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid.
ERROR 001020: Input series error. Incompatible parameter list.
Click 'Always reset parameters...' check-box to reset parameters.
Failed to execute (MakeGraph).
I am not even sure were this "Always reset parameters..." check-box is???
Here is a very simple code that I wrote that I can't get to work.# Import system modules import arcpy from arcpy import env # Set environment settings env.workspace = "c:/reacch/graphs" # Set local variables output_graph_name = "1910precip" verticalBarGraph_bmp = "C:/reacch/graphs/1910precip.bmp" graph_grf = "standard_bar.tee" inputData = "C:/reacch/climate maps/precip1910" # Create the graph graph = arcpy.Graph() # Add a vertical bar series to the graph graph.addSeriesBarVertical(inputData, "COUNT") # Execute MakeGraph to create a Vertical Bar graph arcpy.MakeGraph_management(graph_grf,graph,"Precip") arcpy.SaveGraph_management(output_graph_name, verticalBarGraph_bmp)
Any help would be very much appreciated!!!