<?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: Split format label for xaxis values with PROC SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348175#M12077</link>
    <description>&lt;P&gt;I just tried&amp;nbsp;fitpolicy=SPLITALWAYS but it did not work.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2017 15:48:56 GMT</pubDate>
    <dc:creator>jaemin</dc:creator>
    <dc:date>2017-04-07T15:48:56Z</dc:date>
    <item>
      <title>Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348170#M12075</link>
      <description>&lt;P&gt;I am trying to split the formmated xasix values in two lines with PROC SGPLOT but it is not working. Anybody has idea how to do that with SGPLOT (not GCHART)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 
ods html gpath="&amp;amp;figuredir" image_dpi=200 ;
ods graphics/reset=index scale=off /*border=off*/ imagename="Descriptive Figure - PGA v1" width=10in height=6.5in;
title1 "Disease activity of patients remaining on adalimumab by month";
footnote;

proc sgplot data=freq dattrmap=attrmap2;
   vbar time / group=pgagrp  response=percent2  name="grouping"   BARWIDTH=0.7 NOOUTLINE  attrid=pgagrp     ;
   xaxis type=linear values=(0 to 36 by 3) label="Month (ADA/N)" fitpolicy=split SPLITCHAR=" ";
   yaxis label='Percent' values=(0 to 100 by 10);
   keylegend "grouping"   ;
   format   pgagrp pgagrptwo. time tfmttwo. percent2 7.1;
run;

ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8208i6847DD350518F4E8/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Descriptive Figure - PGA v1.png" title="Descriptive Figure - PGA v1.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 15:39:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348170#M12075</guid>
      <dc:creator>jaemin</dc:creator>
      <dc:date>2017-04-07T15:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348172#M12076</link>
      <description>&lt;P&gt;Use the SPLITALWAYS fitpolicy instead of the SPLIT policy. The SPLIT policy splits only when there is a collision.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 15:42:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348172#M12076</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-04-07T15:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348175#M12077</link>
      <description>&lt;P&gt;I just tried&amp;nbsp;fitpolicy=SPLITALWAYS but it did not work.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 15:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348175#M12077</guid>
      <dc:creator>jaemin</dc:creator>
      <dc:date>2017-04-07T15:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348186#M12078</link>
      <description>&lt;P&gt;Sorry, I just picked up on the fact that you are using TYPE=LINEAR. In that case, the SPLIT policies have no effect. They work only for DISCRETE axes.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 16:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348186#M12078</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-04-07T16:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348188#M12079</link>
      <description>&lt;P&gt;The value is numeric but the formatted value is discrete. SAS does not have options for&amp;nbsp;that situation?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 16:03:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348188#M12079</guid>
      <dc:creator>jaemin</dc:creator>
      <dc:date>2017-04-07T16:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348194#M12080</link>
      <description>&lt;P&gt;Can you show us what your &amp;nbsp;tfmttwo format definition looks like?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 16:26:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348194#M12080</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-07T16:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348202#M12081</link>
      <description>&lt;P&gt;Here is the format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8210iFE8375200955DD71/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;DIV class="branch"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 07 Apr 2017 16:48:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348202#M12081</guid>
      <dc:creator>jaemin</dc:creator>
      <dc:date>2017-04-07T16:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348209#M12082</link>
      <description>&lt;P&gt;Here is a workaround. &amp;nbsp;You could&amp;nbsp;remove&amp;nbsp;the TYPE=Linear, and keep the discrete behavior. &amp;nbsp;Include&amp;nbsp;all values 1-36 by 3 in the category column, with missing response for the ones you don't want (15, 21, etc). &amp;nbsp;Then, you can get the gaps on the x axis, and set FitPolicy=SplitAlways. &amp;nbsp;Use format or VALUESDISPLAY to control x-axis tick display.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 17:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348209#M12082</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-04-07T17:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348260#M12086</link>
      <description>&lt;P&gt;I edited the format and removed TYPE=LINEAR. Now it splits but &lt;STRONG&gt;how can I hide the values&amp;nbsp;I don't want:&amp;nbsp;15, 21, 27. 33?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8215i55243DD167334645/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html gpath="&amp;amp;figuredir" image_dpi=200 ;
ods graphics/reset=index scale=off /*border=off*/ imagename="test" width=10in height=6.5in;
title1 "Disease activity of patients remaining on adalimumab by month";
proc sgplot data=freq dattrmap=attrmap2;
   vbar time / group=pgagrp  response=percent2  name="grouping"   BARWIDTH=0.7 NOOUTLINE  attrid=pgagrp     ;
   xaxis    values=(0 to 36 by 3)       label="Month (ADA/N)" fitpolicy=SPLITALWAYS  SPLITCHAR=" ";
   yaxis label='Percent' values=(0 to 100 by 10);
   keylegend "grouping"   
   format   pgagrp pgagrptwo. time tfmttwo. percent2 7.1;
run;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8216i9C63D6B194676511/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="test.png" title="test.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 18:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348260#M12086</guid>
      <dc:creator>jaemin</dc:creator>
      <dc:date>2017-04-07T18:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348263#M12087</link>
      <description>&lt;P&gt;Cool. &amp;nbsp;Two ways. &amp;nbsp;One, you can put that in your format, make those values blank. &amp;nbsp;Or, you can use VALUESDISPLAY option on the x-axis.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 18:53:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348263#M12087</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-04-07T18:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348265#M12088</link>
      <description>&lt;P&gt;I tried making them blank in the format but&amp;nbsp;I don't think it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8217i9AEE8860B5B567F7/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="test.png" title="test.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 18:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348265#M12088</guid>
      <dc:creator>jaemin</dc:creator>
      <dc:date>2017-04-07T18:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348268#M12089</link>
      <description>&lt;P&gt;Aah, that's right. &amp;nbsp;It collapses all the blanks together into one blank value. &amp;nbsp;You will need to use non breaking space for each of the blank value. &amp;nbsp;Note, each one has to be different, so they don't get lumped into one category. &amp;nbsp;See: &amp;nbsp;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2012/09/03/doing-more-with-nbsp/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2012/09/03/doing-more-with-nbsp/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 19:12:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348268#M12089</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-04-07T19:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348290#M12091</link>
      <description>&lt;P&gt;If your UDF is not aggregating data, then you could try putting the format on the VALUESFORMAT option on the axis and not on the column. &amp;nbsp;Would be easier to help if you attach the full program with data so we can run it and try various options.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 20:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348290#M12091</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-04-07T20:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Split format label for xaxis values with PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348742#M12122</link>
      <description>&lt;P&gt;I used the method&lt;/P&gt;&lt;PRE class="sas"&gt;xaxis=&lt;SPAN&gt;translate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;xaxis, &lt;SPAN&gt;'A0'&lt;/SPAN&gt;&lt;SPAN&gt;x&lt;/SPAN&gt;, &lt;SPAN&gt;'.'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;P&gt;you described in the webpage to create the format and it worked!!! Thanks so much!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data time_all2;
 merge tfmt time_all;
  by time;
  if time=15 then tlabel=put(time,best12.)||"="||quote('.') ;
  if time=21 then tlabel=put(time,best12.)||"="||quote('..') ;
  if time=27 then tlabel=put(time,best12.)||"="||quote('...') ;
  if time=33 then tlabel=put(time,best12.)||"="||quote('....') ;
  	tlabel2=translate(tlabel, 'A0'x, '.');
run;

proc sql;
 select tlabel2 into :tlabel separated by " "
  from time_all2;
quit;

proc format;
 value tfmttwo &amp;amp;tlabel  ;
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=freq dattrmap=attrmap2;
   vbar time / group=pgagrp  response=percent2  name="grouping"   BARWIDTH=0.7 NOOUTLINE  attrid=pgagrp     ;
   xaxis    values=(0 to 36 by 3)     label="Month (ADA/N)" fitpolicy=SPLITALWAYS  SPLITCHAR=" "   ;
   yaxis label='Percent' values=(0 to 100 by 10);
   keylegend "grouping"   ;
   format   pgagrp pgagrptwo. time tfmttwo. percent2 7.1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8245i13E9146A188B4EE4/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8246i3FB8526D4DCCE69A/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="test.png" title="test.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 15:18:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SGPLOT/m-p/348742#M12122</guid>
      <dc:creator>jaemin</dc:creator>
      <dc:date>2017-04-10T15:18:48Z</dc:date>
    </item>
  </channel>
</rss>

