<?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 How do I split labels in SGPanel? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157047#M5883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So this is my code thus far:&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;PROC SGPANEL DATA=new&amp;amp;file;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; PANELBY nb/rows=&amp;amp;rows columns=&amp;amp;cols spacing=5 novarname;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VBOX value/category=combined;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FORMAT nb &amp;amp;fmt..;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; %IF %UPCASE(&amp;amp;refline)^= %THEN %DO;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; refline &amp;amp;refline / axis=y lineattrs=(pattern=5);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; %END;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; rowaxis values=(&amp;amp;range) label="&amp;amp;label";&lt;/P&gt;
&lt;P&gt;&amp;nbsp; colaxis display=(nolabel);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; refline 0 / axis=y;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WHERE &amp;amp;wh;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the bottom of the output&lt;/P&gt;&lt;P&gt;&lt;IMG alt="http://i.imgur.com/pT5bDgr.png" class="jive-image" src="http://i.imgur.com/pT5bDgr.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sadly This is the labels I need to keep for this graph, but I am hoping to make it so it doesn't present it at an angle, but instead multiple lines.. I was told I should split the character label, but I have no idea how to do that.&amp;nbsp; I did find the splitchar statement (SPLITCHAR=&lt;SPAN class="xis-userSuppliedValue" style="font-style: italic;"&gt;“character-list")&lt;/SPAN&gt;&lt;SPAN class="xis-userSuppliedValue"&gt; within the SAS documentation, but I can't find examples on how to apply it. I am unsure if this is the right statement that I should use to make it the way I want it.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Feb 2015 17:48:27 GMT</pubDate>
    <dc:creator>Tpham</dc:creator>
    <dc:date>2015-02-06T17:48:27Z</dc:date>
    <item>
      <title>How do I split labels in SGPanel?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157047#M5883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So this is my code thus far:&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;PROC SGPANEL DATA=new&amp;amp;file;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; PANELBY nb/rows=&amp;amp;rows columns=&amp;amp;cols spacing=5 novarname;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VBOX value/category=combined;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FORMAT nb &amp;amp;fmt..;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; %IF %UPCASE(&amp;amp;refline)^= %THEN %DO;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; refline &amp;amp;refline / axis=y lineattrs=(pattern=5);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; %END;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; rowaxis values=(&amp;amp;range) label="&amp;amp;label";&lt;/P&gt;
&lt;P&gt;&amp;nbsp; colaxis display=(nolabel);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; refline 0 / axis=y;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WHERE &amp;amp;wh;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the bottom of the output&lt;/P&gt;&lt;P&gt;&lt;IMG alt="http://i.imgur.com/pT5bDgr.png" class="jive-image" src="http://i.imgur.com/pT5bDgr.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sadly This is the labels I need to keep for this graph, but I am hoping to make it so it doesn't present it at an angle, but instead multiple lines.. I was told I should split the character label, but I have no idea how to do that.&amp;nbsp; I did find the splitchar statement (SPLITCHAR=&lt;SPAN class="xis-userSuppliedValue" style="font-style: italic;"&gt;“character-list")&lt;/SPAN&gt;&lt;SPAN class="xis-userSuppliedValue"&gt; within the SAS documentation, but I can't find examples on how to apply it. I am unsure if this is the right statement that I should use to make it the way I want it.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 17:48:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157047#M5883</guid>
      <dc:creator>Tpham</dc:creator>
      <dc:date>2015-02-06T17:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I split labels in SGPanel?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157048#M5884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution depends on the release of SAS you are using.&amp;nbsp; Always include that with your question.&amp;nbsp; Please see &lt;A __default_attr="10106" __jive_macro_name="document" class="jive_macro jive_macro_document" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you see the SPLITCHAR option in the doc, you are likely using SAS9.4 or later release.&amp;nbsp; You need to set the FITPOLICY=SPLIT on the COLAXIS.&amp;nbsp; Here is sample code and what you get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods graphics / reset width=8in height=3in;&lt;/P&gt;&lt;P&gt;proc sgpanel data=sashelp.heart;&lt;/P&gt;&lt;P&gt;panelby weight_Status / columns=3 onepanel ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vbar deathcause;&lt;/P&gt;&lt;P&gt;&amp;nbsp; colaxis fitpolicy=split;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="9069" alt="SGPanel_Split.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/9069_SGPanel_Split.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 19:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157048#M5884</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-02-06T19:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I split labels in SGPanel?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157049#M5885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this, I was wondering, is there a way for it to work on 9.2 also? So I am on 9.4 but other coders I am working with are on 9.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 20:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157049#M5885</guid>
      <dc:creator>Tpham</dc:creator>
      <dc:date>2015-02-09T20:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I split labels in SGPanel?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157050#M5886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, there is no simple option prior to SAS 9.4 that will do this for you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SAS 9.3, you can use the SG Annotatio feature to draw split tick values with some extra effort.&amp;nbsp; You will need to turn off the axis tick values, and use the SG Annotation TEXT function to render the values.&amp;nbsp; This function can automatically split the words in a text string in a certain width.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For SAS 9.2, my suggestion would be to switch the Row and Col axis variables so the long text strings will go you the Y axis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 22:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/157050#M5886</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-02-09T22:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I split labels in SGPanel?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/446942#M15364</link>
      <description>&lt;P&gt;Suppose you wanted to split the PANELBY labels instead?&amp;nbsp; (So, in the example above it would be the "Weight Status = " labels.)&amp;nbsp; Is that possible in V9.4?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 21:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/446942#M15364</guid>
      <dc:creator>sasuser_md</dc:creator>
      <dc:date>2018-03-19T21:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I split labels in SGPanel?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/446947#M15365</link>
      <description>&lt;P&gt;Not really. The "label" is really a name/value pair.The best option for shrinking the header in this particular example is to use the NOVARNAME to get rid of the name part (i.e. "weight_status =") and incorporate the "weight status" reference into the title or footnote. Do you have a case where the value part needs to be split?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 21:53:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/446947#M15365</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-03-19T21:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I split labels in SGPanel?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/446948#M15366</link>
      <description>&lt;P&gt;Yes, the labels for each panel are relatively long, but would fit if split.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 21:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-split-labels-in-SGPanel/m-p/446948#M15366</guid>
      <dc:creator>sasuser_md</dc:creator>
      <dc:date>2018-03-19T21:55:34Z</dc:date>
    </item>
  </channel>
</rss>

