<?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 Legend label rounding with Python in ArcGIS Pro in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/legend-label-rounding-with-python-in-arcgis-pro/m-p/1389062#M79560</link>
    <description>&lt;P&gt;&lt;SPAN&gt;In a legend of feature layer, I would like to format the subtitle so that it doesn't print the full number, but rounds the category limits to 2 decimal places. I want to implement the format shown in the image not manually, but within a python script. I am using ArcGIS Pro 3.2 version.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe with&amp;nbsp;a CIM tool can solve this? So far I haven't found an example script how.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="49251242-f66c-484b-ae97-8f6ed59f7272.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96358iB789457A8349E1CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="49251242-f66c-484b-ae97-8f6ed59f7272.png" alt="49251242-f66c-484b-ae97-8f6ed59f7272.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;aprx = arcpy.mp.ArcGISProject(&lt;SPAN class=""&gt;"CURRENT"&lt;/SPAN&gt;)
m = aprx.listMaps(&lt;SPAN class=""&gt;"Map"&lt;/SPAN&gt;)[&lt;SPAN class=""&gt;0&lt;/SPAN&gt;]
lyr5 = m.addDataFromPath(elev)
sym5 = lyr5.symbology
&lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN class=""&gt;hasattr&lt;/SPAN&gt;(sym5, &lt;SPAN class=""&gt;'renderer'&lt;/SPAN&gt;):
    &lt;SPAN class=""&gt;if&lt;/SPAN&gt; sym5.renderer.&lt;SPAN class=""&gt;type&lt;/SPAN&gt; == &lt;SPAN class=""&gt;'SimpleRenderer'&lt;/SPAN&gt;:
        sym5.updateRenderer(&lt;SPAN class=""&gt;"GraduatedColorsRenderer"&lt;/SPAN&gt;)
        sym5.renderer.classificationField = &lt;SPAN class=""&gt;"Elevation"&lt;/SPAN&gt;
        sym5.renderer.colorRamp = aprx.listColorRamps(&lt;SPAN class=""&gt;"Elevation #3"&lt;/SPAN&gt;)[&lt;SPAN class=""&gt;0&lt;/SPAN&gt;]
        sym5.renderer.breakCount = &lt;SPAN class=""&gt;10&lt;/SPAN&gt;
        lyr5.symbology = sym5&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Feb 2024 19:47:45 GMT</pubDate>
    <dc:creator>KITEfejlesztes</dc:creator>
    <dc:date>2024-02-29T19:47:45Z</dc:date>
    <item>
      <title>Legend label rounding with Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/legend-label-rounding-with-python-in-arcgis-pro/m-p/1389062#M79560</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In a legend of feature layer, I would like to format the subtitle so that it doesn't print the full number, but rounds the category limits to 2 decimal places. I want to implement the format shown in the image not manually, but within a python script. I am using ArcGIS Pro 3.2 version.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe with&amp;nbsp;a CIM tool can solve this? So far I haven't found an example script how.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="49251242-f66c-484b-ae97-8f6ed59f7272.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96358iB789457A8349E1CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="49251242-f66c-484b-ae97-8f6ed59f7272.png" alt="49251242-f66c-484b-ae97-8f6ed59f7272.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;aprx = arcpy.mp.ArcGISProject(&lt;SPAN class=""&gt;"CURRENT"&lt;/SPAN&gt;)
m = aprx.listMaps(&lt;SPAN class=""&gt;"Map"&lt;/SPAN&gt;)[&lt;SPAN class=""&gt;0&lt;/SPAN&gt;]
lyr5 = m.addDataFromPath(elev)
sym5 = lyr5.symbology
&lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN class=""&gt;hasattr&lt;/SPAN&gt;(sym5, &lt;SPAN class=""&gt;'renderer'&lt;/SPAN&gt;):
    &lt;SPAN class=""&gt;if&lt;/SPAN&gt; sym5.renderer.&lt;SPAN class=""&gt;type&lt;/SPAN&gt; == &lt;SPAN class=""&gt;'SimpleRenderer'&lt;/SPAN&gt;:
        sym5.updateRenderer(&lt;SPAN class=""&gt;"GraduatedColorsRenderer"&lt;/SPAN&gt;)
        sym5.renderer.classificationField = &lt;SPAN class=""&gt;"Elevation"&lt;/SPAN&gt;
        sym5.renderer.colorRamp = aprx.listColorRamps(&lt;SPAN class=""&gt;"Elevation #3"&lt;/SPAN&gt;)[&lt;SPAN class=""&gt;0&lt;/SPAN&gt;]
        sym5.renderer.breakCount = &lt;SPAN class=""&gt;10&lt;/SPAN&gt;
        lyr5.symbology = sym5&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 19:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/legend-label-rounding-with-python-in-arcgis-pro/m-p/1389062#M79560</guid>
      <dc:creator>KITEfejlesztes</dc:creator>
      <dc:date>2024-02-29T19:47:45Z</dc:date>
    </item>
  </channel>
</rss>

