<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help! Graduated Colors Symbology Automation and Classification in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120823#M9462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use cursor to extract max value then after importing symbology from .lyr use symbology attribute of layer, and set classBreakValues parameter (it should be sorted list of break values). So it should looks something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
...

with arcpy.da.SearchCursor(lyr, (field_name)) as cur:
&amp;nbsp; max_v = max([v[0] for v in cur])
...
if lyr.supports('SYMBOLOGY'):
&amp;nbsp; lyr.symbology.valueField = field_name
&amp;nbsp; lyr.symbology.classBreakValues = [0, 0.01 * max_v, 0.05 * max_v, 0.5 * max_v, 0.75 *max_v, max_v]
&amp;nbsp; 
...
arcpy.RefreshActiveView()
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Arek&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 07:01:07 GMT</pubDate>
    <dc:creator>ArkadiuszMatoszka</dc:creator>
    <dc:date>2021-12-11T07:01:07Z</dc:date>
    <item>
      <title>Help! Graduated Colors Symbology Automation and Classification</title>
      <link>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120821#M9460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone know how to apply the graduated colors symbology using ArcPy? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will use manual classification and apply percentages rather than values. For each map i make, i need to represent 1%, 5%, 50%, 75% ranges of the max value in the data. The problem starts when I import symbology from a layer. I can import the symbology and labels, but the percentage ranges represent the previous data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can i set the classification to represent these percentages using ArcPy? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 23:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120821#M9460</guid>
      <dc:creator>ShaneArmour</dc:creator>
      <dc:date>2012-10-09T23:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help! Graduated Colors Symbology Automation and Classification</title>
      <link>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120822#M9461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After importing symbology from .lyr use symbology attribute of layer, and set classBreakValues parameter (it should be sorted list of break values). So it should look like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
...
lyr = arcpy.mapping.ListLayers(mxd, 'layer_name_in_mxd)[0]
if lyr.supports('SYMBOLOGY'):
&amp;nbsp; lyr.symbology.valueField = field_name
&amp;nbsp; lyr.symbology.classBreakValues = [0, 0.01, 0.05, 0.5, 0.75, 1]
&amp;nbsp; lyr.symbology.classBreakLabels = ['&amp;lt;1%', '1-5%', '5-50%', '50-75%', '&amp;gt;75%']
...
arcpy.RefreshActiveView()
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Arek&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:01:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120822#M9461</guid>
      <dc:creator>ArkadiuszMatoszka</dc:creator>
      <dc:date>2021-12-11T07:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help! Graduated Colors Symbology Automation and Classification</title>
      <link>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120823#M9462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use cursor to extract max value then after importing symbology from .lyr use symbology attribute of layer, and set classBreakValues parameter (it should be sorted list of break values). So it should looks something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
...

with arcpy.da.SearchCursor(lyr, (field_name)) as cur:
&amp;nbsp; max_v = max([v[0] for v in cur])
...
if lyr.supports('SYMBOLOGY'):
&amp;nbsp; lyr.symbology.valueField = field_name
&amp;nbsp; lyr.symbology.classBreakValues = [0, 0.01 * max_v, 0.05 * max_v, 0.5 * max_v, 0.75 *max_v, max_v]
&amp;nbsp; 
...
arcpy.RefreshActiveView()
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Arek&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:01:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120823#M9462</guid>
      <dc:creator>ArkadiuszMatoszka</dc:creator>
      <dc:date>2021-12-11T07:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help! Graduated Colors Symbology Automation and Classification</title>
      <link>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120824#M9463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on the automation now. I'll let you know if it works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 22:00:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-graduated-colors-symbology-automation-and/m-p/120824#M9463</guid>
      <dc:creator>ShaneArmour</dc:creator>
      <dc:date>2012-10-10T22:00:51Z</dc:date>
    </item>
  </channel>
</rss>

