<?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: SGPLOT AXISTABLE Labels - Split over multiple lines in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669697#M20224</link>
    <description>&lt;P&gt;Please copy your data step from your post, paste into your SAS editor and run the data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then check if you really meant to use ODDSR8.3 as an informat. Since ODDSR is not a SAS supplied informat we can't use that and in many cases you really do not want to include a decimal bit with the informat unless you want SAS to imply a non-existant decimal position.&lt;/P&gt;
&lt;P&gt;Reading a value like 123456 with an informat of 6.2 yields a value o f1234&lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;56&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you can provide a data step that will run completely then we'll be in a better position to answer questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 20:12:38 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-07-15T20:12:38Z</dc:date>
    <item>
      <title>SGPLOT AXISTABLE Labels - Split over multiple lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669691#M20222</link>
      <description>&lt;P&gt;I am looking to produce a forest plot with YAXISTABLES using SAS 9.04.01M3&lt;/P&gt;&lt;P&gt;The labels for the table are not splitting in the correct place and I'd like to dictate where the splits occur (i'd like Placebo/Active on first line, N=XX on second and n/M (%) on third)&lt;/P&gt;&lt;P&gt;Plot examples below&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="forest1.png" style="width: 907px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47219iB971DB05B20BFF88/image-size/large?v=v2&amp;amp;px=999" role="button" title="forest1.png" alt="forest1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried various escape character options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;(*ESC*){UNICODE '0D0A'X} - Did not decode&lt;/LI&gt;&lt;LI&gt;(*ESC*){UNICODE '000A'X} - Did not decode&lt;/LI&gt;&lt;LI&gt;It does not appear possible to include a split character.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SAS Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; data WORK.PLOTDATA3;
   infile datalines dsd truncover;
   input sgval:32. indentl:32. plab:$40. n_pbo:$15. n_act:$15. valtab:$18. OddsRatioEst:ODDSR8.3 LowerCL:ODDSR8.3 UpperCL:ODDSR8.3 yval:32. orref:32. xl:32. text:$1.;
   format OddsRatioEst ODDSR8.3 LowerCL ODDSR8.3 UpperCL ODDSR8.3;
   label OddsRatioEst="Odds Ratio" LowerCL="Wald Lower Confidence Limit for Odds Ratio" UpperCL="Wald Upper Confidence Limit for Odds Ratio";
 datalines;
 1 0 Overall       . . . 1 . .  
 2 1 Overall xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.713 1.288 2.279 2 1.7130795416 .  
 1 0 Baseline Clinical Status       . . . 3 . .  
 2 1 Hosp. HF Oxy, NIV xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.714 1.073 2.738 4 . .  
 2 1 Hosp. Int, MV xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.712 1.195 2.454 5 . .  
 1 0 Age Group       . . . 6 . .  
 2 1 &amp;lt;60 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.580 1.055 2.366 7 . .  
 2 1 60 to &amp;lt;70 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 2.197 1.361 3.545 8 . .  
 2 1 70 to &amp;lt;80 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.211 0.569 2.577 9 . .  
 1 0 Baseline Clinical Status, Age Group       . . . 10 . .  
 2 1 Hosp. HF Oxy, NIV, &amp;lt;60 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.634 1.166 2.290 11 . .  
 2 1 Hosp. HF Oxy, NIV, 60 to &amp;lt;70 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.634 1.166 2.290 12 . .  
 2 1 Hosp. HF Oxy, NIV, 70 to &amp;lt;80 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.634 1.166 2.290 13 . .  
 2 1 Hosp. Int, MV , &amp;lt;60 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 1.634 1.166 2.290 14 . .  
 2 1 Hosp. Int, MV , 60 to &amp;lt;70 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 2.433 1.412 4.191 15 . .  
 2 1 Hosp. Int, MV , 70 to &amp;lt;80 years xxx/xxx (xxx%) xxx/xxx (xxx%) x.xx (x.xx,x.xx) 0.984 0.431 2.248 16 . .  
 . .         . . . 17 . 2 O
 . .         . . . 17 . 0.5 P
 ;;;;

PROC SGPLOT DATA=plotdata3 DATTRMAP=attrmap NOBORDER NOWALL NOAUTOLEGEND;
  FORMAT text $txt.;
  STYLEATTRS axisextent=data;
  REFLINE 1 / AXIS=x LINEATTRS=(THICKNESS=2 COLOR=grey);
  REFLINE orref / AXIS=x LINEATTRS=(THICKNESS=1 COLOR=grey PATTERN=2);
  SCATTER X=oddsratioest Y=yval / XERRORLOWER=lowercl XERRORUPPER=uppercl MARKERATTRS=(SYMBOL=CIRCLEFILLED SIZE=9 COLOR="BLACK") ERRORBARATTRS=(COLOR="BLACK") ;
  YAXISTABLE plab / POSITION=left LOCATION=inside INDENTWEIGHT=indentl  TEXTGROUP=sgval TEXTGROUPID=text  VALUEATTRS=(size=9) NOLABEL;
  YAXISTABLE n_pbo n_act valtab / POSITION=right LOCATION=inside VALUEATTRS=(size=9) VALUEHALIGN=center LABELATTRS=(SIZE=9);
  TEXT x=xl y=yval text=text / POSITION=bottom CONTRIBUTEOFFSETS=none STRIP TEXTATTRS=(SIZE=9);
  
  YAXIS DISPLAY=none REVERSE FITPOLICY=NONE OFFSETMAX=0.04 OFFSETMIN=0;
  XAXIS LABEL="Odds Ratio" LABELPOS=DATACENTER VALUEATTRS=(SIZE=10) MIN=0 MAX=8 TYPE=log VALUES=(0.25, 0.5, 1.0, 2.0, 4.0, 8.0);
  LABEL valtab = "OR (95% CI)"
        n_pbo = "Placebo N=XX n/M (%)"
        n_act = "Active N=XX n/M (%)";
RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 20:00:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669691#M20222</guid>
      <dc:creator>dave_inman</dc:creator>
      <dc:date>2020-07-15T20:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT AXISTABLE Labels - Split over multiple lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669697#M20224</link>
      <description>&lt;P&gt;Please copy your data step from your post, paste into your SAS editor and run the data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then check if you really meant to use ODDSR8.3 as an informat. Since ODDSR is not a SAS supplied informat we can't use that and in many cases you really do not want to include a decimal bit with the informat unless you want SAS to imply a non-existant decimal position.&lt;/P&gt;
&lt;P&gt;Reading a value like 123456 with an informat of 6.2 yields a value o f1234&lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;56&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you can provide a data step that will run completely then we'll be in a better position to answer questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 20:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669697#M20224</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-15T20:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT AXISTABLE Labels - Split over multiple lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669701#M20225</link>
      <description>&lt;P&gt;&lt;A href="https://www.pharmasug.org/proceedings/2017/DV/PharmaSUG-2017-DV03.pdf" target="_blank"&gt;https://www.pharmasug.org/proceedings/2017/DV/PharmaSUG-2017-DV03.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be interested in my paper with Mary Beth Herring.&amp;nbsp; Search for "split".&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 20:14:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669701#M20225</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2020-07-15T20:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT AXISTABLE Labels - Split over multiple lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669820#M20227</link>
      <description>&lt;P&gt;I used the supplied code to generate the datastep, shame it doesn't work...: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712,&lt;/A&gt; As I didn't create the informat it must be a SAS supplied informat (perhaps in SAS Stat)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway new code below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data WORK.PLOTDATA3;
   infile datalines dsd truncover delimiter='#';
   input sgval:32. indentl:32. plab:$40. n_pbo:$15. n_act:$15. valtab:$18. OddsRatioEst:8.3 LowerCL:8.3 UpperCL:8.3 yval:32. orref:32. xl:32. text:$1.;
  
   label OddsRatioEst="Odds Ratio" LowerCL="Wald Lower Confidence Limit for Odds Ratio" UpperCL="Wald Upper Confidence Limit for Odds Ratio";
 datalines;
 1#0#Overall####.#.#.#1#.#.  
 2#1#Overall#xxx/xxx (xxx%)#xxx/xxx (xxx%)#x.xx (x.xx,x.xx)#1.713#1.288#2.279#2#1.7130795416#. 
 1#0#Baseline Clinical Status#####.#.#3#.#.# 
 2#1#Hosp. HF Oxy, NIV#xxx/xxx (xxx%)#xxx/xxx (xxx%)#x.xx (x.xx,x.xx)#1.714#1.073#2.738#4#.#.  
 2#1#Hosp. Int, MV#xxx/xxx (xxx%)#xxx/xxx (xxx%)#x.xx (x.xx,x.xx)#1.712#1.195#2.454#5#.#.  
 1#0#Age Group####.#.#.#6#.#.  
 2#1#&amp;lt;60 years#xxx/xxx (xxx%)#xxx/xxx (xxx%)#x.xx (x.xx,x.xx)#1.580#1.055#2.366#7#.#. 
 2#1#60 to &amp;lt;70 years#xxx/xxx (xxx%)#xxx/xxx (xxx%)#x.xx (x.xx,x.xx)#2.197#1.361#3.545#8#.#.  
 2#1#70 to &amp;lt;80 years#xxx/xxx (xxx%)#xxx/xxx (xxx%)#x.xx (x.xx,x.xx)#1.211#0.569#2.577#9#.#.  
 .#.#####.#.#.#10#.#2#O
 .#.#####.#.#.#10#.#0.5#P
 ;;;;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 07:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669820#M20227</guid>
      <dc:creator>dave_inman</dc:creator>
      <dc:date>2020-07-16T07:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT AXISTABLE Labels - Split over multiple lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669822#M20228</link>
      <description>&lt;P&gt;Thanks, that appears to work for Rowlabels, and I suppose you could convert the "labels" into rows in your yaxistable when you want a column label, but that seems a bit clumsy I was hoping there was a simple way...&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 07:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-AXISTABLE-Labels-Split-over-multiple-lines/m-p/669822#M20228</guid>
      <dc:creator>dave_inman</dc:creator>
      <dc:date>2020-07-16T07:42:49Z</dc:date>
    </item>
  </channel>
</rss>

