[GIS] arcpy.mapping Graduated Colors Symbology

arcgis-10.1arcpyfeature-layersymbology

I'm trying to figure out how to apply graduated color symbology to a feature class by using arcpy.mapping in ArcMap 10.1.

To start, a script runs and a feature class is added to a map document, no problem. This feature class needs the graduated colors. The value field used for the graduated colors is created during the script.

In order to apply the graduated colors, I have to create a layer file from the feature class. This is where I start to get confused. I know UpdateLayer has to be used, and I have to base the update on a source layer? I tried this with no luck.

If someone can just guide me on what order the steps are to apply a graduated color symbology to a feature class using arcpy.mapping, it will be appreciated. I should be able to figure out the rest of the scripting. Thanks!

Best Answer

I haven't tried this personally, but it looks like you need to access the GraduatedColorsSymbology class on the layer. Have a look at the second example at the bottom of this page.

It also looks like you may need to have an existing lyr file with the graduated colours already set in order to use UpdateLayer.

Related Question