rfinch

Q. about how to best use Symbology->Quantities->Graduated colors from arcpy

Discussion created by rfinch on Aug 19, 2011
Latest reply on Sep 1, 2011 by rfinch
I am displaying results of a 1D model of the Sacramento-San Joaquin Delta in N. California. The many canals of the Delta are represented by 517 channels in the model, which in turn are 517 polylines in ArcMap.

For one run, I color each polyline differently using Symbology->Quantities->Graduated colors using the field PctDiff (type double) in a table:



I about 200 runs of the model comparing differences from a base run. The 200 runs are classified into 40 groups with 5 runs each.  I need the line coloring scheme to be identical for the 5 runs within a group, but the coloring values will be recalculated from group to group.

The way I do this manually is to make a Definition Query to select 5 runs in one group, and then click Symbology->Quantities->Graduated colors->Classification->Natural Breaks to make ArcMap calculate a color scheme for those 5*517 = 2585 lines. Then I switch the Classification to Manual, so as to freeze the line color Range and Interval, re-do the Definition Query for each of the 5 runs, and make 5 maps.

This is a tedious process and I need to script it with arcpy. My questions are


  • Is there a function or class to directly manipulate the Symbology of a Layer? I've been searching in Help but can't find anything.

  • If not, the only other way I've seen is maybe arcpy.ApplySymbologyFromLayer_management. Is there something better?

Outcomes