I am trying to create a series of maps using arcpy (see below my code that creates one map in each iteration). For each map I need to change the definition query and the value field, keeping the same classification break values. The script does that all, but polygon outline appears (see picture on the left).
Does anyone know how to remove the outline or how to perform the same task without having the outline appear (as in the picture on the right)?
I am using ArcGIS for Desktop 10.2 Basic.
My ArcMap Document contains only polygon layers. The polygons are small squares. They are not a raster, though.
I first symbolized the layers manually (Quantities, Graduated Colors, Classification: Natural breaks). The break values from this classification are in list1 in the script below, as I want all maps to have these break values, but in each map different field should be classified. That is why I change the value field in my code, and then use list1 to define break values. However, this causes the polygon outline to appear.
symbologyTemplate = arcpy.GetParameterAsText(1)
print "START"
mxd = arcpy.mapping.MapDocument("path_map.mxd")
prnw_lyr = None
for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.name == "Test_lyr":
prnw_lyr = lyr
break
list1 = [10, 30, 50, 70, 100]
for i in range(2, 10, 1):
for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.name == "Test_lyr":
queryStr = "nrp_" + str(i)
lyr.definitionQuery = queryStr + "> 0"
print "new atrribute " + queryStr + " done"
prnw_lyr.symbology.valueField = "prnw_" + str(i)
lyr.symbology.classBreakValues = list1
lyr.symbology.classBreakLabels = ["Label 1", "Label 2", "Label 3", "Label 4"]
arcpy.RefreshActiveView()
arcpy.mapping.ExportToJPEG(mxd, "path_export" + str(i) + ".jpeg")
del mxd
print "Process DONE"