<?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 Splitting a Label in PROC SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-a-Label-in-PROC-SGPLOT/m-p/826654#M23054</link>
    <description>&lt;P&gt;I am trying to create a plot via PROC SGPLOT. The variable on the Y-axis has a very long label, which SAS splits to make it fit. I want to control where the split happens, rather than let SAS control the split. The ODS ESCAPECHAR and `{newline 1} in the code produces a message in the log that I can't do it that way. Is there some other way I can cause this label to be split where I want it to be split?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1262  ods escapechar = '`';
1263  ods pdf file="&amp;amp;pers\test.pdf";
NOTE: Writing ODS PDF output to DISK destination "g:\MillerP\test.pdf", printer "PDF".
1264  proc sgplot data=sashelp.class;
1265      scatter x=height y=weight;
1266      yaxis label='This is a very long label `{newline 1} that is probably too long';
1267  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.72 seconds
      cpu time            0.34 seconds

NEWLINE FUNCTION NOT DEFINED IN THIS TAGSET
NEWLINE FUNCTION NOT DEFINED IN THIS TAGSET
NOTE: There were 19 observations read from the data set SASHELP.CLASS.

1268  ods pdf close;
&lt;/PRE&gt;
&lt;P&gt;This produces the following plot where the label is split where SAS wants to split it and not where I want to split it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1659452207698.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74017iD4F4088BE5B68807/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1659452207698.png" alt="PaigeMiller_0-1659452207698.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 14:58:14 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-08-02T14:58:14Z</dc:date>
    <item>
      <title>Splitting a Label in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-a-Label-in-PROC-SGPLOT/m-p/826654#M23054</link>
      <description>&lt;P&gt;I am trying to create a plot via PROC SGPLOT. The variable on the Y-axis has a very long label, which SAS splits to make it fit. I want to control where the split happens, rather than let SAS control the split. The ODS ESCAPECHAR and `{newline 1} in the code produces a message in the log that I can't do it that way. Is there some other way I can cause this label to be split where I want it to be split?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1262  ods escapechar = '`';
1263  ods pdf file="&amp;amp;pers\test.pdf";
NOTE: Writing ODS PDF output to DISK destination "g:\MillerP\test.pdf", printer "PDF".
1264  proc sgplot data=sashelp.class;
1265      scatter x=height y=weight;
1266      yaxis label='This is a very long label `{newline 1} that is probably too long';
1267  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.72 seconds
      cpu time            0.34 seconds

NEWLINE FUNCTION NOT DEFINED IN THIS TAGSET
NEWLINE FUNCTION NOT DEFINED IN THIS TAGSET
NOTE: There were 19 observations read from the data set SASHELP.CLASS.

1268  ods pdf close;
&lt;/PRE&gt;
&lt;P&gt;This produces the following plot where the label is split where SAS wants to split it and not where I want to split it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1659452207698.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74017iD4F4088BE5B68807/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1659452207698.png" alt="PaigeMiller_0-1659452207698.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 14:58:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-a-Label-in-PROC-SGPLOT/m-p/826654#M23054</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-02T14:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting a Label in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-a-Label-in-PROC-SGPLOT/m-p/826662#M23055</link>
      <description>&lt;P&gt;Perhaps:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.class;
    scatter x=height y=weight;
    yaxis label="This is a very long label (*ESC*){unicode '000A'x} that is probably too long";
run;&lt;/PRE&gt;
&lt;P&gt;000A is linefeed, so might be OS and or file dependent. Did not test with PDF&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 15:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-a-Label-in-PROC-SGPLOT/m-p/826662#M23055</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-02T15:23:46Z</dc:date>
    </item>
  </channel>
</rss>

