<?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: How to modify Line Thickness by Category using Map Class methods in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-modify-line-thickness-by-category-using-map/m-p/1214519#M60061</link>
    <description>&lt;P&gt;Well done Johannes,&lt;/P&gt;&lt;P&gt;So simple and easy to add to my code.&lt;BR /&gt;&lt;BR /&gt;I only made one small change "width+1" as the zero indexing caused the '1' class to be zero width.&lt;BR /&gt;&lt;BR /&gt;Such an elegant solution,&lt;BR /&gt;&lt;BR /&gt;Thanks so much,&lt;BR /&gt;&lt;BR /&gt;Anthony&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for width, item in enumerate(sym.renderer.groups[0].items):
    item.symbol.size = width+1
lyr.symbology = sym&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2022 09:58:31 GMT</pubDate>
    <dc:creator>Anthony_R_McKay</dc:creator>
    <dc:date>2022-09-21T09:58:31Z</dc:date>
    <item>
      <title>How to modify Line Thickness by Category using Map Class methods</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-modify-line-thickness-by-category-using-map/m-p/1214502#M60057</link>
      <description>&lt;P&gt;I am doing a Python project on Stream Order.&lt;BR /&gt;&lt;BR /&gt;So far my script can generate a stream vector fc&amp;nbsp; (called 'Stream') and copy this into a map (called 'Map')&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 394px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51721i9FBC057373CC227E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The script then colours the polylines blue according to a classification in the field 'grin_code' (actually the Strahler classification number, 1 to 4).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;"# specify map in project named "Map"&lt;BR /&gt;&lt;/SPAN&gt;m = p.listMaps(&lt;SPAN&gt;'Map'&lt;/SPAN&gt;)[&lt;SPAN&gt;0&lt;/SPAN&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# specify lyaer in map named "stream"&lt;BR /&gt;&lt;/SPAN&gt;lyr = m.listLayers(&lt;SPAN&gt;'Stream'&lt;/SPAN&gt;)[&lt;SPAN&gt;0&lt;/SPAN&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# access symbology of maps and change symbology to graduated colors&lt;BR /&gt;&lt;/SPAN&gt;sym = lyr.symbology&lt;BR /&gt;sym.updateRenderer(&lt;SPAN&gt;'UniqueValueRenderer'&lt;/SPAN&gt;)&lt;BR /&gt;sym.renderer.fields = [&lt;SPAN&gt;'grid_code'&lt;/SPAN&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;colorRamp = p.listColorRamps(&lt;SPAN&gt;"Blues"&lt;/SPAN&gt;)[&lt;SPAN&gt;0&lt;/SPAN&gt;]&lt;BR /&gt;sym.renderer.colorRamp = colorRamp&lt;BR /&gt;&lt;SPAN&gt;# sym.renderer.colorRamp = "Blues(4 Classes)_Sequential_2"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# save symbology back onto maps&lt;BR /&gt;&lt;/SPAN&gt;lyr.symbology = sym&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# save project&lt;BR /&gt;&lt;/SPAN&gt;p.save()"&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.JPG" style="width: 395px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51722i9D465167EDB1AB5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.JPG" alt="Capture1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, I would like to adjust the line thickness for each category&amp;nbsp; according to&amp;nbsp;'grid_code'.&lt;BR /&gt;&lt;BR /&gt;This is what I did in ArcGIS Pro to achieve what I wanted.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51723i3A32CD37A61367E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I would like to know is , how do I go about this in Python?&lt;/P&gt;&lt;P&gt;Creating these flow analyses is a fairly common task - so it is possible that creating this visualisation this has been tackled before.&lt;/P&gt;&lt;P&gt;Any help very much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 07:50:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-modify-line-thickness-by-category-using-map/m-p/1214502#M60057</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-21T07:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify Line Thickness by Category using Map Class methods</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-modify-line-thickness-by-category-using-map/m-p/1214512#M60058</link>
      <description>&lt;LI-CODE lang="python"&gt;for width, item in enumerate(sym.renderer.groups[0].items):
    item.symbol.size = width
lyr.symbology = sym&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Sep 2022 08:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-modify-line-thickness-by-category-using-map/m-p/1214512#M60058</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-09-21T08:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify Line Thickness by Category using Map Class methods</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-modify-line-thickness-by-category-using-map/m-p/1214519#M60061</link>
      <description>&lt;P&gt;Well done Johannes,&lt;/P&gt;&lt;P&gt;So simple and easy to add to my code.&lt;BR /&gt;&lt;BR /&gt;I only made one small change "width+1" as the zero indexing caused the '1' class to be zero width.&lt;BR /&gt;&lt;BR /&gt;Such an elegant solution,&lt;BR /&gt;&lt;BR /&gt;Thanks so much,&lt;BR /&gt;&lt;BR /&gt;Anthony&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for width, item in enumerate(sym.renderer.groups[0].items):
    item.symbol.size = width+1
lyr.symbology = sym&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 09:58:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-modify-line-thickness-by-category-using-map/m-p/1214519#M60061</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-21T09:58:31Z</dc:date>
    </item>
  </channel>
</rss>

