<?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: Gap on a specific position in forest plot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883733#M23957</link>
    <description>&lt;P&gt;This trick works well.&lt;/P&gt;
&lt;P&gt;thank you !!&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 14:01:53 GMT</pubDate>
    <dc:creator>oussema</dc:creator>
    <dc:date>2023-07-06T14:01:53Z</dc:date>
    <item>
      <title>Gap on a specific position in forest plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883346#M23934</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I increase the gap before the last confidence interval in forest plot using proc sgplot.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 19:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883346#M23934</guid>
      <dc:creator>oussema</dc:creator>
      <dc:date>2023-07-03T19:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Gap on a specific position in forest plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883430#M23940</link>
      <description>It would be better if you post a picture to explain this question.</description>
      <pubDate>Tue, 04 Jul 2023 11:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883430#M23940</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-07-04T11:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Gap on a specific position in forest plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883689#M23955</link>
      <description>&lt;P&gt;I need to increase the distance mentioned with a red arrow.&lt;/P&gt;
&lt;P&gt;Please find it in the attached file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 09:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883689#M23955</guid>
      <dc:creator>oussema</dc:creator>
      <dc:date>2023-07-06T09:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Gap on a specific position in forest plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883702#M23956</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;


data forest_subgroup;
infile cards truncover expandtabs;
  input Id Subgroup : $80. Count Percent : $40.  Count_test Percent_test  : $40.   Mean  Low  High   ci :$40. pvalue $;
  indentWt=1;
  ObsId=_n_; 
  datalines;
2 aa                        332  6.35(3.45)	111	 3.73(3.98) 	2.62   1.85  3.39  2.62(1.85,3.39)	&amp;lt;0.001
2 1～3                  	101	5.80(3.43)	36	3.75(4.38)	2.05 0.63 3.47   2.05(0.63,3.47)	0.005
2 4～7                    120	6.30(3.69)	37	2.73(3.65)	3.58 2.21 4.95   3.58(2.21,4.95)	&amp;lt;0.001
2 8～14                 	111	6.91(3.12)	38	4.69(3.75)	2.22 0.99 3.44   2.22(0.99,3.44)	&amp;lt;0.001
2 &amp;lt;6	                    78	3.44(2.73)	37	1.31(2.79)	2.13 1.04 3.21   2.13(1.04,3.21)	&amp;lt;0.001
2 ＞6                     	254	7.25(3.14)	74	4.94(3.95)	2.31 1.32 3.30   2.31(1.32,3.30)	&amp;lt;0.001
2 bbb	            162	6.32(3.79)	63	3.65(4.43)	2.67 1.50 3.83   2.67(1.50,3.83)	&amp;lt;0.001
2 cc	            170	6.38(3.09)	48	3.83(3.35)	2.55 1.54 3.56   2.55(1.54,3.56)	&amp;lt;0.001
2 dd 	298	6.41(3.22)	107	3.78(4.04)	2.64 1.78 3.49   2.64(1.78,3.49)	&amp;lt;0.001
2 ee		            364	6.23(3.36)	120	3.67(3.91)	2.56 1.78 3.35   2.56(1.78,3.35)	&amp;lt;0.001
2 ff                    	104	5.77(3.39)	37	3.65(4.37)	 2.12 0.53  3.71  2.12(0.53,3.71)	0.010
2 gg                 	135	6.23(3.56)	41	2.91(3.52)   3.32  2.07  4.57	3.32(2.07,4.57)	&amp;lt;0.001
1 xxxxxx
2 ALL                  	125	6.62(3.08)	42	4.44(3.79)	2.19  1.03  3.34   2.19(1.03,3.34)	&amp;lt;0.001
;
run;



data forest_subgroup;
 set forest_subgroup;
  indentWt=1;
  ObsId=_n_; 
run;
data forest_subgroup_2;
  set forest_subgroup nobs=n end=last;
  length text $20;
  val=mod(_N_-1, 6);
/*  if val eq 1 or val eq 2 or val eq 3 then ref=obsid;*/
 if mod(obsid,2 )=0 then ref=obsid;
  /*--Separate Subgroup headers and obs into separate columns--*/
  indentwt=2;
  if id=1 then indentWt=0;

  output;
  if last then do;
    call missing (subgroup, count, percent, Count_test ,Percent_test,   mean, low, high,  ci,
                   indentwt, val, ref ,pvalue);
        obsid=n+1; 
    xl=1; yl=n+1; text='P'; output;;
        xl=4; yl=n+1; text='T'; output;
  end;
  run;

/*--Define Format with Unicode for the left and right arrows--*/
proc format;;
  value $txt
  "T" = "test better (*ESC*){Unicode '2192'x}"
  "P" = "(*ESC*){Unicode '2190'x} placebo better";
run;

/*--Attribute maps for Subgroup Test attributes--*/
data attrmap;
  length textweight $10;
  id='text'; value='1'; textcolor='white'; textsize=15; textweight='bold'; output;
  id='text'; value='2'; textcolor='Black'; textsize=10; textweight='normal'; output;
run;
/*--Forest Plot--*/
options missing=' ';
/*ods listing style=htmlblue;*/
title j=l h=1.2  "                              test                      placebo";
/*ods listing gpath='c:\temp\' image_dpi=400;*/
/*ods graphics / reset width=5in height=3in imagename='Subgroup_Forest_SG_94';*/

ods graphics / reset width=9.6in height=4.5in   noborder noscale;
proc sgplot data=forest_subgroup_2 nowall noborder nocycleattrs dattrmap=attrmap noautolegend;
  format text $txt.;
  styleattrs axisextent=data;
  refline ref / lineattrs=(thickness=22 color=grayee);  
  highlow y=obsid low=low high=high /lowcap=serif highcap=serif lineattrs=(color=black); 
  scatter y=obsid x=mean / markerattrs=(symbol=squarefilled size=8 color=black );
  scatter y=obsid x=mean / markerattrs=(size=0) x2axis;
  refline 0 / axis=x;

  text x=xl y=obsid text=text / position=bottom contributeoffsets=none strip  textattrs=(size=10);
  yaxistable subgroup  / location=inside position=left textgroup=id labelattrs=(size=10)  
            LABELJUSTIFY=left  valueattrs=(size=10 ) 
             textgroupid=text indentweight=indentWt;
  yaxistable  Count Percent  Count_test Percent_test ci pvalue/ VALUEJUSTIFY=right
  location=inside position=left labelattrs=(size=10) valueattrs=(size=10) pad=(right=15px) ;
  yaxis reverse display=none colorbands=odd colorbandsattrs=(transparency=1)  ;
  xaxis display=(nolabel) values=(0 to 5 by 1);
  x2axis label='ODDS' display=(noline noticks novalues) labelattrs=(size=10)  ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1688644358081.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85587i3781AD28B9C8059A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1688644358081.png" alt="Ksharp_0-1688644358081.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 11:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883702#M23956</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-07-06T11:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Gap on a specific position in forest plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883733#M23957</link>
      <description>&lt;P&gt;This trick works well.&lt;/P&gt;
&lt;P&gt;thank you !!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 14:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gap-on-a-specific-position-in-forest-plot/m-p/883733#M23957</guid>
      <dc:creator>oussema</dc:creator>
      <dc:date>2023-07-06T14:01:53Z</dc:date>
    </item>
  </channel>
</rss>

