<?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: SGPANEL header wrap in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806782#M22744</link>
    <description>&lt;P&gt;Perhaps&lt;/P&gt;
&lt;PRE&gt;(*ESC*){newline}&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Apr 2022 14:06:59 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2022-04-08T14:06:59Z</dc:date>
    <item>
      <title>SGPANEL header wrap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806776#M22743</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having some difficulties in producing a barplot using PROC SGPANEL. My value labels (panel variable) are so long that they cannot fit into&amp;nbsp; the header box. I have tried to decreace fontsize together with adjusting some size options. Is there a way to cut the label (it is a sentence) into two rows of text?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Janne&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 13:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806776#M22743</guid>
      <dc:creator>janneen</dc:creator>
      <dc:date>2022-04-08T13:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL header wrap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806782#M22744</link>
      <description>&lt;P&gt;Perhaps&lt;/P&gt;
&lt;PRE&gt;(*ESC*){newline}&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Apr 2022 14:06:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806782#M22744</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2022-04-08T14:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL header wrap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806787#M22745</link>
      <description>&lt;P&gt;Simplest might be assign different label text just for the Sgpanel plot(s) to override the long label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of code you can run as you should have the SASHELP.CLASS data set.&lt;/P&gt;
&lt;P&gt;This creates a data set with a default label that is moderately long, plots with that default and then overrides the default label.&lt;/P&gt;
&lt;PRE&gt;data example;
   set sashelp.class;
   label sex= 'This is a ridiculously long label for a gender variable';
run;

proc sgpanel data=example;
   panelby sex;
   vbar age;
run;

/* how to override default label*/

proc sgpanel data=example;
   panelby sex;
   vbar age;
   label sex='A short label';
run;&lt;/PRE&gt;
&lt;P&gt;Otherwise, provide the actual code you are running along with example data in the form of a data step that has the current label. You should also include your ODS Graphics settings as those control actual space occupied by a graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Depending on the actual graph you are making (hint) perhaps the default headers are not needed and the NOHEADER option on the Panelby might apply. The Panelby option NOVARNAME will suppress the variable name/ variable label and just show the value of the Panelby variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 14:30:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806787#M22745</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-08T14:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL header wrap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806819#M22746</link>
      <description>&lt;P&gt;I don't know how to split the output, but you can use the FORMAT statement if you want to truncate the questions to some smaller length:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Questions;
length Q $100;
Q = "This is the first questions. Do you think it is very long?";
Val = "Yes"; Count = 16;
output;
Val = "No "; Count = 14;
output;

Q = "The second question also has many words in it. Do you think it is long?";
Val = "Yes"; Count = 12;
output;
Val = "No "; Count = 18;
output;
run;

proc sgpanel data=Questions;
format Q $25.;
panelby Q / novarname;
vbar Val / freq=Count;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Apr 2022 17:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806819#M22746</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-08T17:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL header wrap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806831#M22747</link>
      <description>&lt;P&gt;You could split the strings somehow and use INSET as a workaround (thanks to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; for the test data):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Questions;
length Q Q1 Q2 $100;
Q = "The first question. Do you think it is very long?";
Q1 = "The first question";
Q2 = "Do you think it is very long?";
Val = "Yes"; Count = 16;
output;
Val = "No "; Count = 14;
output;

Q = "The second question. Do you think it is quite long?";
Q1 = "The second question";
Q2 = "Do you think it is quite long?";
Val = "Yes"; Count = 12;
output;
Val = "No "; Count = 18;
output;
run;

proc sgpanel data=Questions;
panelby Q / noheader;
vbar Val / freq=Count;
inset q1 q2 / nolabel position=top textattrs=(size=10);
rowaxis offsetmax=0.15;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PGStats_1-1649443515993.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70250i795D69F38120E7BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="PGStats_1-1649443515993.png" alt="PGStats_1-1649443515993.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 18:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-header-wrap/m-p/806831#M22747</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-04-08T18:47:47Z</dc:date>
    </item>
  </channel>
</rss>

