<?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 Add Table to Bottom of Graph in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764471#M242155</link>
    <description>&lt;P&gt;I am trying to tweak the code from here:&amp;nbsp;&lt;A href="https://support.sas.com/kb/56/520.html" target="_blank"&gt;https://support.sas.com/kb/56/520.html&lt;/A&gt;&amp;nbsp;to match my data. However, I have ran into some unexpected issues.&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Median (Min-Max) and Mean(STD) are not showing up in the colaxis table. Is this because they are stored as character? Do the values have to be numeric?&lt;/LI&gt;
&lt;LI&gt;Not all the box plots are centered. Is there a way to fix this?&lt;/LI&gt;
&lt;LI&gt;Not really an issue, but is there a way to have "BMI category" on top of the graph rather than the bottom?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Data:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariko5797_1-1630073801584.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63093i2C0A74063EA4FC0D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariko5797_1-1630073801584.png" alt="mariko5797_1-1630073801584.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Code &amp;amp; Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / reset width = 750px height = 460px noscale attrpriority = none;
proc sgpanel data = workstats;
 panelby BMIGRP / novarname columns = 3;
 vbox ADJDV / category = BMIGRP;
 colaxis display = (noticks novalues);
 colaxistable _CNT_ / label = 'N' position = bottom separator
				  valueattrs = (size=10) labelattrs = (size=10);
 colaxistable MEAN_STD / label = 'Mean(sd)' position = bottom 
				  valueattrs = (size=10) labelattrs = (size=10);
 colaxistable MED_RANGE / label = 'Median(Min - Max)' position = bottom 
				  valueattrs = (size=10) 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="mariko5797_0-1630073218223.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63092i02B391627A7BD8D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariko5797_0-1630073218223.png" alt="mariko5797_0-1630073218223.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Aug 2021 14:24:28 GMT</pubDate>
    <dc:creator>mariko5797</dc:creator>
    <dc:date>2021-08-27T14:24:28Z</dc:date>
    <item>
      <title>Add Table to Bottom of Graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764471#M242155</link>
      <description>&lt;P&gt;I am trying to tweak the code from here:&amp;nbsp;&lt;A href="https://support.sas.com/kb/56/520.html" target="_blank"&gt;https://support.sas.com/kb/56/520.html&lt;/A&gt;&amp;nbsp;to match my data. However, I have ran into some unexpected issues.&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Median (Min-Max) and Mean(STD) are not showing up in the colaxis table. Is this because they are stored as character? Do the values have to be numeric?&lt;/LI&gt;
&lt;LI&gt;Not all the box plots are centered. Is there a way to fix this?&lt;/LI&gt;
&lt;LI&gt;Not really an issue, but is there a way to have "BMI category" on top of the graph rather than the bottom?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Data:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariko5797_1-1630073801584.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63093i2C0A74063EA4FC0D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariko5797_1-1630073801584.png" alt="mariko5797_1-1630073801584.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Code &amp;amp; Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / reset width = 750px height = 460px noscale attrpriority = none;
proc sgpanel data = workstats;
 panelby BMIGRP / novarname columns = 3;
 vbox ADJDV / category = BMIGRP;
 colaxis display = (noticks novalues);
 colaxistable _CNT_ / label = 'N' position = bottom separator
				  valueattrs = (size=10) labelattrs = (size=10);
 colaxistable MEAN_STD / label = 'Mean(sd)' position = bottom 
				  valueattrs = (size=10) labelattrs = (size=10);
 colaxistable MED_RANGE / label = 'Median(Min - Max)' position = bottom 
				  valueattrs = (size=10) 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="mariko5797_0-1630073218223.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63092i02B391627A7BD8D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariko5797_0-1630073218223.png" alt="mariko5797_0-1630073218223.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 14:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764471#M242155</guid>
      <dc:creator>mariko5797</dc:creator>
      <dc:date>2021-08-27T14:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Add Table to Bottom of Graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764474#M242156</link>
      <description>&lt;A href="https://communities.sas.com/t5/SAS-Programming/proc-SGPLOT-vbox-summary-statistics-like-proc-boxplot/m-p/254674#M48601" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/proc-SGPLOT-vbox-summary-statistics-like-proc-boxplot/m-p/254674#M48601&lt;/A&gt;</description>
      <pubDate>Fri, 27 Aug 2021 14:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764474#M242156</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-08-27T14:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add Table to Bottom of Graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764475#M242157</link>
      <description>&lt;P&gt;The character values still don't show. Do they have to be numeric to show in the table?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 14:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764475#M242157</guid>
      <dc:creator>mariko5797</dc:creator>
      <dc:date>2021-08-27T14:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add Table to Bottom of Graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764612#M242201</link>
      <description>Yes. Mean Min Max should be numeric .</description>
      <pubDate>Sat, 28 Aug 2021 11:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764612#M242201</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-08-28T11:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add Table to Bottom of Graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764640#M242210</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/311553"&gt;@mariko5797&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am trying to tweak the code from here:&amp;nbsp;&lt;A href="https://support.sas.com/kb/56/520.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/56/520.html&lt;/A&gt;&amp;nbsp;to match my data. However, I have ran into some unexpected issues.&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Median (Min-Max) and Mean(STD) are not showing up in the colaxis table. Is this because they are stored as character? Do the values have to be numeric?&lt;/LI&gt;
&lt;LI&gt;Not all the box plots are centered. Is there a way to fix this?&lt;/LI&gt;
&lt;LI&gt;Not really an issue, but is there a way to have "BMI category" on top of the graph rather than the bottom?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;1) You might try an INSET statement.&lt;/P&gt;
&lt;P&gt;2) Centered which way? All of the elements on a single row have the same Y-axis definition. If you want things vertically centered you will need to place them on different rows and not use the same scale for each row (the default) and then hope the results are "centered". Differing ranges of outliers means that is almost never going to happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want things centered horizontally then the X axis value would have to be the same for each box if it is numeric.&lt;/P&gt;
&lt;P&gt;If you remove the NOVALUES on the Colaxis statement you will see the offsets are caused by the values of the BMIGRP variable.&lt;/P&gt;
&lt;P&gt;Below is an example of adding a variable to create a horizontally centered boxes.&lt;/P&gt;
&lt;PRE&gt;proc sgpanel data = sashelp.class;
 panelby sex / novarname ;
 vbox age / category = sex;
 colaxis ;
run;

data alt;
   set sashelp.class;
   dummy=1;
run;

proc sgpanel data = alt;
 panelby sex / novarname ;
 vbox age / category = dummy;
 colaxis ;
run;&lt;/PRE&gt;
&lt;P&gt;3) I don't find an option to move the label to the top. You could suppress the text and use a annotate data set to add text above the graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 17:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-Table-to-Bottom-of-Graph/m-p/764640#M242210</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-28T17:09:53Z</dc:date>
    </item>
  </channel>
</rss>

