<?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: Side-by-side box plots in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Side-by-side-box-plots/m-p/444318#M111217</link>
    <description>&lt;P&gt;It may help to provide a small example data set with 3 or 4 fake companies and a number of values for the other variables similar to your data so we can make some charts and see which comes close to what you want.&lt;/P&gt;
&lt;P&gt;Instructions here: &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; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your example code would have attempted to create over 1000 plots (one per name) and is the likely problem of not having enough "panels".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One approach may require restructuring your data. See if this comes anywhere close to what you might want.&lt;/P&gt;
&lt;PRE&gt;data junk;
   input name $ position $ value ;
datalines;
a  SAL_FULL 50000
b  SAL_FULL 52000
c  SAL_FULL 63000
d  SAL_FULL 57000
e  SAL_FULL 77700
f  SAL_FULL 80000
a  SAL_ASC  44000
b  SAL_ASC  48000
c  SAL_ASC  49000
d  SAL_ASC  55000
e  SAL_ASC  67700
f  SAL_ASC  60000
;
run;

proc sgplot data=junk;
   hbox value/ category=position;
run;&lt;/PRE&gt;
&lt;P&gt;Note that Proc BOXPLOT is pretty old and new enhancements are mostly going to proc SGPLOT/SGPANEL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS GRAPHICS statement would be using to adjust the size of the graphic area and 13 positions, as above, could be quite easy to fit in a single display.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Mar 2018 00:30:06 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-03-10T00:30:06Z</dc:date>
    <item>
      <title>Side-by-side box plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Side-by-side-box-plots/m-p/444311#M111213</link>
      <description>&lt;P&gt;I have a data set involving a different salaries for different positions at a bunch of different companies.&amp;nbsp; The different companies are the rows and the different positions (13 total) are the columns.&amp;nbsp; For the life of me, I cannot figure out how to set up side-by-side box plots for each of the different positions (in the columns).&amp;nbsp; I actually don't need all thirteen in one graphic, I'd be happy to have just four of them side-by-side.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried variations of the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc boxplot data=SalaryByPosition;&lt;BR /&gt;PLOT (AVE_SAL_FULL AVE_SAL_ASSOC AVE_SAL_ASSIST AVE_SAL_ALL)*NAME;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"NAME" is just the column header for the names of the companies (there are over a thousand)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error I get mentions not having enough "panels."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help with this would be appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 23:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Side-by-side-box-plots/m-p/444311#M111213</guid>
      <dc:creator>phuzface</dc:creator>
      <dc:date>2018-03-09T23:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Side-by-side box plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Side-by-side-box-plots/m-p/444318#M111217</link>
      <description>&lt;P&gt;It may help to provide a small example data set with 3 or 4 fake companies and a number of values for the other variables similar to your data so we can make some charts and see which comes close to what you want.&lt;/P&gt;
&lt;P&gt;Instructions here: &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; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your example code would have attempted to create over 1000 plots (one per name) and is the likely problem of not having enough "panels".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One approach may require restructuring your data. See if this comes anywhere close to what you might want.&lt;/P&gt;
&lt;PRE&gt;data junk;
   input name $ position $ value ;
datalines;
a  SAL_FULL 50000
b  SAL_FULL 52000
c  SAL_FULL 63000
d  SAL_FULL 57000
e  SAL_FULL 77700
f  SAL_FULL 80000
a  SAL_ASC  44000
b  SAL_ASC  48000
c  SAL_ASC  49000
d  SAL_ASC  55000
e  SAL_ASC  67700
f  SAL_ASC  60000
;
run;

proc sgplot data=junk;
   hbox value/ category=position;
run;&lt;/PRE&gt;
&lt;P&gt;Note that Proc BOXPLOT is pretty old and new enhancements are mostly going to proc SGPLOT/SGPANEL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS GRAPHICS statement would be using to adjust the size of the graphic area and 13 positions, as above, could be quite easy to fit in a single display.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2018 00:30:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Side-by-side-box-plots/m-p/444318#M111217</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-10T00:30:06Z</dc:date>
    </item>
  </channel>
</rss>

