Here's how to create multi-line legend labels

2247
2
05-16-2012 11:06 PM
NickFillo
New Contributor III
Hello,

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.

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.  For example:

"This is my\r\nmulti-line label" will display in the legend label as

This is my
multi-line label

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.

Hope that helps somebody.
Tags (2)
0 Kudos
2 Replies
SusanFinger
New Contributor
For me "SITE\r\nBuffer" displays as

"SITE\r\nBuffer"...what am I missing?

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?

Thanks, Susan
0 Kudos
ChrisPedrezuela
Occasional Contributor III
You need to go into python window, access the layer property name and use your inputs like,


for lyr in lyrs:
  if lyr.name == 'SITE Buffer':
    lyr.name = 'SITE\r\nBuffer'



For me "SITE\r\nBuffer" displays as

"SITE\r\nBuffer"...what am I missing?

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?

Thanks, Susan
0 Kudos