<?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: Left justified legend title and labels in PROC SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798394#M22627</link>
    <description>&lt;P&gt;I tried using '09'x, but it still didn't work.&amp;nbsp;&lt;A href="https://support.sas.com/kb/36/612.html" target="_self"&gt;This link&lt;/A&gt;&amp;nbsp;says that the tab character will be converted as blanks when the codes are submitted, when using the enhance editor (if I didn't misunderstand). I think add a legend title manually using annotation may help, like what Jay recommended. Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 24 Feb 2022 15:07:41 GMT</pubDate>
    <dc:creator>Chaupak</dc:creator>
    <dc:date>2022-02-24T15:07:41Z</dc:date>
    <item>
      <title>Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798278#M22621</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering if there's any way to make the legend title and labels left justified in PROC SGPLOT, because I have a long legend title. Here is the example of my current situation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sasforum4.png" style="width: 377px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68795iB076A1B38A3105E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="sasforum4.png" alt="sasforum4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I generated this legend using KEYLEGEND statement and put it on the upper left corner. As is shown above, I want to move "&amp;lt;= 5 mg/kg/day" and "&amp;gt; 5 mg/kg/day" to the left, which is to left justify with the legend title "xxxxxxx". Is there any way to do that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 23:51:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798278#M22621</guid>
      <dc:creator>Chaupak</dc:creator>
      <dc:date>2022-02-23T23:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798279#M22622</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;Are you using KEYLEGEND? &lt;/STRIKE&gt;EDIT: You said you were &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A manual kludged method assuming no one else has a better solution, what happens if you add some trailing spaces at the end of the labels, either spaces or tabs (09)? Does that force it to the left more?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&amp;gt; 5 mg/kg/day&lt;U&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/U&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/397340"&gt;@Chaupak&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am wondering if there's any way to make the legend title and labels left justified in PROC SGPLOT, because I have a long legend title. Here is the example of my current situation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sasforum4.png" style="width: 377px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68795iB076A1B38A3105E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="sasforum4.png" alt="sasforum4.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I generated this legend using KEYLEGEND statement and put it on the upper left corner. As is shown above, I want to move "&amp;lt;= 5 mg/kg/day" and "&amp;gt; 5 mg/kg/day" to the left, which is to left justify with the legend title "xxxxxxx". Is there any way to do that?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 00:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798279#M22622</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-02-24T00:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798280#M22623</link>
      <description>Hi Reeza, thanks for your suggestion, but it seems like the space was trimmed when I tried.</description>
      <pubDate>Thu, 24 Feb 2022 00:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798280#M22623</guid>
      <dc:creator>Chaupak</dc:creator>
      <dc:date>2022-02-24T00:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798292#M22624</link>
      <description>Spaces will likely be, you'll need to add tabs or a different form of white space. If you have example code to play with that would help. &lt;BR /&gt;</description>
      <pubDate>Thu, 24 Feb 2022 01:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798292#M22624</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-02-24T01:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798321#M22625</link>
      <description>&lt;P&gt;You may need to place the legend with a blank title, and add the title using SGAnnotate.&lt;/P&gt;
&lt;P&gt;See Dan's paper:&amp;nbsp;&amp;nbsp;&lt;A href="https://support.sas.com/resources/papers/proceedings11/277-2011.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;https://support.sas.com/resources/papers/proceedings11/277-2011.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 06:07:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798321#M22625</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2022-02-24T06:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798365#M22626</link>
      <description>&lt;P&gt;As Reeza said ,try TAB character&lt;FONT color="#FF0000"&gt; '09'x&lt;/FONT&gt; , NOT blank character.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 12:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798365#M22626</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-02-24T12:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798394#M22627</link>
      <description>&lt;P&gt;I tried using '09'x, but it still didn't work.&amp;nbsp;&lt;A href="https://support.sas.com/kb/36/612.html" target="_self"&gt;This link&lt;/A&gt;&amp;nbsp;says that the tab character will be converted as blanks when the codes are submitted, when using the enhance editor (if I didn't misunderstand). I think add a legend title manually using annotation may help, like what Jay recommended. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 15:07:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798394#M22627</guid>
      <dc:creator>Chaupak</dc:creator>
      <dc:date>2022-02-24T15:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798395#M22628</link>
      <description>I tried this way and it helps! I added the legend title using sganno manually, and adjusted the legend position using OUTERPAD= in KEYLEGEND. Thank you!</description>
      <pubDate>Thu, 24 Feb 2022 15:09:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798395#M22628</guid>
      <dc:creator>Chaupak</dc:creator>
      <dc:date>2022-02-24T15:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Left justified legend title and labels in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798790#M22629</link>
      <description>&lt;P&gt;Another option is to use SAS/Graph Proc Gplot (rather than Base Proc SGplot).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a short example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;legend1 position=(top left inside) across=1 
   label=(position=top 'xxxxxxxxxxxxxxxxxxxxxx');
symbol value=none interpol=join;
proc gplot data=sashelp.stocks;
plot close*date=stock / legend=legend1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GraphGuy_0-1645838338499.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68953i36D6646FDA3B5EDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GraphGuy_0-1645838338499.png" alt="GraphGuy_0-1645838338499.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 01:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-justified-legend-title-and-labels-in-PROC-SGPLOT/m-p/798790#M22629</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2022-02-26T01:19:33Z</dc:date>
    </item>
  </channel>
</rss>

