<?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 Here's how to create multi-line legend labels in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/here-s-how-to-create-multi-line-legend-labels/m-p/396098#M31268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Won't take credit for finding this as somebody else gave me the idea, but I haven't seen the solution posted anywhere in the forums and several people have asked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To create a multi-line legend label, you simply need to add \r\n into the label where you want the second (and third, fourth, etc) line to start.&amp;nbsp; For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"This is my\r\nmulti-line label" will display in the legend label as&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;multi-line label&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that you will be able to write multi-line legend descriptions from python script in 10.1, but with this trick, you will be able to write both labels and descriptions on multiple lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps somebody.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 May 2012 06:06:30 GMT</pubDate>
    <dc:creator>NickFillo</dc:creator>
    <dc:date>2012-05-17T06:06:30Z</dc:date>
    <item>
      <title>Here's how to create multi-line legend labels</title>
      <link>https://community.esri.com/t5/python-questions/here-s-how-to-create-multi-line-legend-labels/m-p/396098#M31268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Won't take credit for finding this as somebody else gave me the idea, but I haven't seen the solution posted anywhere in the forums and several people have asked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To create a multi-line legend label, you simply need to add \r\n into the label where you want the second (and third, fourth, etc) line to start.&amp;nbsp; For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"This is my\r\nmulti-line label" will display in the legend label as&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;multi-line label&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that you will be able to write multi-line legend descriptions from python script in 10.1, but with this trick, you will be able to write both labels and descriptions on multiple lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps somebody.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 06:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/here-s-how-to-create-multi-line-legend-labels/m-p/396098#M31268</guid>
      <dc:creator>NickFillo</dc:creator>
      <dc:date>2012-05-17T06:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Here's how to create multi-line legend labels</title>
      <link>https://community.esri.com/t5/python-questions/here-s-how-to-create-multi-line-legend-labels/m-p/396099#M31269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For me "SITE\r\nBuffer" displays as&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"SITE\r\nBuffer"...what am I missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've changed it in the symbology label area, in the label appearing next to symbol, and in the layer name on the general tab?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Susan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 15:28:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/here-s-how-to-create-multi-line-legend-labels/m-p/396099#M31269</guid>
      <dc:creator>SusanFinger</dc:creator>
      <dc:date>2014-06-09T15:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Here's how to create multi-line legend labels</title>
      <link>https://community.esri.com/t5/python-questions/here-s-how-to-create-multi-line-legend-labels/m-p/396100#M31270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to go into python window, access the layer property name and use your inputs like,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

for lyr in lyrs:
&amp;nbsp; if lyr.name == 'SITE Buffer':
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.name = 'SITE\r\nBuffer'

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;For me "SITE\r\nBuffer" displays as&lt;BR /&gt;&lt;BR /&gt;"SITE\r\nBuffer"...what am I missing?&lt;BR /&gt;&lt;BR /&gt;I've changed it in the symbology label area, in the label appearing next to symbol, and in the layer name on the general tab?&lt;BR /&gt;&lt;BR /&gt;Thanks, Susan&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:07:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/here-s-how-to-create-multi-line-legend-labels/m-p/396100#M31270</guid>
      <dc:creator>ChrisPedrezuela</dc:creator>
      <dc:date>2021-12-11T18:07:23Z</dc:date>
    </item>
  </channel>
</rss>

