<?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 Box Plots in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667779#M200048</link>
    <description>&lt;P&gt;I have two variables trigliceridbefore and trigliceridafter I want to create a boxplot I cannot find the way. I did separately, but no in the same graphic. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2020 16:50:35 GMT</pubDate>
    <dc:creator>MarioAQ</dc:creator>
    <dc:date>2020-07-08T16:50:35Z</dc:date>
    <item>
      <title>Box Plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667779#M200048</link>
      <description>&lt;P&gt;I have two variables trigliceridbefore and trigliceridafter I want to create a boxplot I cannot find the way. I did separately, but no in the same graphic. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 16:50:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667779#M200048</guid>
      <dc:creator>MarioAQ</dc:creator>
      <dc:date>2020-07-08T16:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Box Plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667782#M200050</link>
      <description>Depends on your data structure partly. Can you show an example of your data and what you've tried so far?&lt;BR /&gt;&lt;BR /&gt;There are many tutorials out there and here's a link to one. The code is at the bottom of the page to download or you should be able to run it directly if you copy/paste it.&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2016/12/08/getting-started-sgplot-part-3-vbox/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2016/12/08/getting-started-sgplot-part-3-vbox/&lt;/A&gt;</description>
      <pubDate>Wed, 08 Jul 2020 16:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667782#M200050</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-08T16:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Box Plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667783#M200051</link>
      <description>&lt;P&gt;You don't show your data, but the data has to be arranged properly if you want both boxplots together in one plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data for_plot;
     input before_after $ triglyceride;
     cards;
before 24
after 31
before 39
after 33
...
before 66
after 70
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So if your data is not in this form, you will have to manipulate it.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 17:00:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667783#M200051</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-08T17:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Box Plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667797#M200058</link>
      <description>&lt;P&gt;Here is an example to get you started:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input id  trigliceridbefore   trigliceridafter;
datalines;
1   10.04   11.62
2   10.24   11.98
3   10.76   11.48
4   10.41   11.31
5   10.56   11.56
6   10.62   11.31
7   10.52   11.40
8   10.69   11.13
9   10.31   11.74
10  10.10   11.45
;

proc transpose data=test out=graphData;
by id;
var triglicerid: ;
label trigliceridbefore="Before"   trigliceridafter="After";
run;

proc sgplot data=graphData noautolegend;
vbox col1 / category=_label_;
xaxis display=(nolabel) reverse;
yaxis label="Triglicerides (&amp;lt;Units&amp;gt;)";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TriglicerideBoxPlot.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47010i25A1FE1A28A51BAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="TriglicerideBoxPlot.png" alt="TriglicerideBoxPlot.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 17:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Box-Plots/m-p/667797#M200058</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-07-08T17:48:36Z</dc:date>
    </item>
  </channel>
</rss>

