<?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 Inquiry about Centering Values in PROC SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Inquiry-about-Centering-Values-in-PROC-SGPLOT/m-p/927958#M24615</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am writing to seek assistance with centering the values of "HR (95% CI)" in a PROC SGPLOT procedure.&lt;/P&gt;
&lt;P&gt;Currently, in my code, the values of "HR (95% CI)" (Var name=HR2)are aligned to the left, and I would like to center them instead. However, I am unsure how to achieve this.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YYK273_0-1715384682871.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96443iD4E6962E343755F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YYK273_0-1715384682871.png" alt="YYK273_0-1715384682871.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my SAS code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=forest_subgroup_2 nowall noborder nocycleattrs dattrmap=attrmap noautolegend;
  format text $txt.;
  styleattrs axisextent=data;
  refline ref2 / lineattrs=(thickness=13 color=cxf0f0f7);
  highlow y=obsid low=CIL high=CIU; 
  scatter y=obsid x=hr / markerattrs=(symbol=squarefilled);
  scatter y=obsid x=hr / markerattrs=(size=0) x2axis;
  refline 1 / axis=x;
  text x=xl y=obsid text=text / position=bottom contributeoffsets=none strip;
  yaxistable subgroup  / location=inside position=left textgroup=id labelattrs=(size=7) 
             textgroupid=text indentweight=indentWt;
  &lt;STRONG&gt;yaxistable &lt;U&gt;HR2&lt;/U&gt;&lt;/STRONG&gt;  pvalue/ location=inside position=right pad=(right=15px) 
             labelattrs=(size=7) valueattrs=(size=7) ;
  yaxis reverse display=none colorbands=odd colorbandsattrs=(transparency=1) offsetmin=0.0;
  xaxis display=(nolabel) /* TYPE=LOG TYPE=LOG LOGSTYLE=LOGEXPAND LOGBASE=10 */ values=(0.0 0.5 1.0 1.5 2.0 2.5 3.0 );
  x2axis label='Hazard Ratio' display=(noline noticks novalues) labelattrs=(size=8);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Could you please advise me on how I can modify the&amp;nbsp;&lt;CODE class="!whitespace-pre hljs language-sas"&gt;&lt;STRONG&gt;yaxistable &lt;U&gt;HR2&lt;/U&gt;&lt;/STRONG&gt;&lt;/CODE&gt; code to center align the values of "HR (95% CI)"?&lt;/P&gt;
&lt;P&gt;Thank you very much for your attention to this matter. I look forward to your guidance.&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 23:48:51 GMT</pubDate>
    <dc:creator>YYK273</dc:creator>
    <dc:date>2024-05-10T23:48:51Z</dc:date>
    <item>
      <title>Inquiry about Centering Values in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Inquiry-about-Centering-Values-in-PROC-SGPLOT/m-p/927958#M24615</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am writing to seek assistance with centering the values of "HR (95% CI)" in a PROC SGPLOT procedure.&lt;/P&gt;
&lt;P&gt;Currently, in my code, the values of "HR (95% CI)" (Var name=HR2)are aligned to the left, and I would like to center them instead. However, I am unsure how to achieve this.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YYK273_0-1715384682871.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96443iD4E6962E343755F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YYK273_0-1715384682871.png" alt="YYK273_0-1715384682871.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my SAS code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=forest_subgroup_2 nowall noborder nocycleattrs dattrmap=attrmap noautolegend;
  format text $txt.;
  styleattrs axisextent=data;
  refline ref2 / lineattrs=(thickness=13 color=cxf0f0f7);
  highlow y=obsid low=CIL high=CIU; 
  scatter y=obsid x=hr / markerattrs=(symbol=squarefilled);
  scatter y=obsid x=hr / markerattrs=(size=0) x2axis;
  refline 1 / axis=x;
  text x=xl y=obsid text=text / position=bottom contributeoffsets=none strip;
  yaxistable subgroup  / location=inside position=left textgroup=id labelattrs=(size=7) 
             textgroupid=text indentweight=indentWt;
  &lt;STRONG&gt;yaxistable &lt;U&gt;HR2&lt;/U&gt;&lt;/STRONG&gt;  pvalue/ location=inside position=right pad=(right=15px) 
             labelattrs=(size=7) valueattrs=(size=7) ;
  yaxis reverse display=none colorbands=odd colorbandsattrs=(transparency=1) offsetmin=0.0;
  xaxis display=(nolabel) /* TYPE=LOG TYPE=LOG LOGSTYLE=LOGEXPAND LOGBASE=10 */ values=(0.0 0.5 1.0 1.5 2.0 2.5 3.0 );
  x2axis label='Hazard Ratio' display=(noline noticks novalues) labelattrs=(size=8);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Could you please advise me on how I can modify the&amp;nbsp;&lt;CODE class="!whitespace-pre hljs language-sas"&gt;&lt;STRONG&gt;yaxistable &lt;U&gt;HR2&lt;/U&gt;&lt;/STRONG&gt;&lt;/CODE&gt; code to center align the values of "HR (95% CI)"?&lt;/P&gt;
&lt;P&gt;Thank you very much for your attention to this matter. I look forward to your guidance.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 23:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Inquiry-about-Centering-Values-in-PROC-SGPLOT/m-p/927958#M24615</guid>
      <dc:creator>YYK273</dc:creator>
      <dc:date>2024-05-10T23:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Inquiry about Centering Values in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Inquiry-about-Centering-Values-in-PROC-SGPLOT/m-p/927978#M24616</link>
      <description>Try this option:&lt;BR /&gt; yaxistable  HR2  pvalue / VALUEJUSTIFY=center ;</description>
      <pubDate>Sat, 11 May 2024 06:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Inquiry-about-Centering-Values-in-PROC-SGPLOT/m-p/927978#M24616</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-05-11T06:50:57Z</dc:date>
    </item>
  </channel>
</rss>

