<?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: Proc Boxplot for percintiles only in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648569#M19912</link>
    <description>Thank you, Dan!</description>
    <pubDate>Mon, 18 May 2020 14:44:32 GMT</pubDate>
    <dc:creator>DmytroYermak</dc:creator>
    <dc:date>2020-05-18T14:44:32Z</dc:date>
    <item>
      <title>Proc Boxplot for percintiles only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648497#M19907</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please help with proc boxplot. I have the dataset where there are just calculated percentiles 10, 25, 50, 75, 90:&lt;/P&gt;
&lt;PRE&gt;data WORK.MOTOR;&lt;BR /&gt;infile datalines dsd truncover;&lt;BR /&gt;input LEVEL:32. MOTOR_TYPE:$14. SUB_TYPE_N:32. P10:32. P25:32. P50:32. P75:32. P90:32.;&lt;BR /&gt;label LEVEL="Level" MOTOR_TYPE="Motor Type" SUB_TYPE_N="Motor Type(N)" P10="10th Percentile" P25="25th Percentile" P50="50th Percentile" P75="75th Percentile" P90="90th Percentile";&lt;BR /&gt;datalines4;&lt;BR /&gt;1,M14,1,24.7,31,33.15,36.3,36.34&lt;BR /&gt;2,M14,1,14.3,22.5,28,29.15,32.72&lt;BR /&gt;3,M14,1,14.3,22.5,28,29.5,32.72&lt;BR /&gt;4,M14,1,15,18,18,26.15,32.78&lt;BR /&gt;5,M14,1,25.2,28.5,31,34.3,35.2&lt;BR /&gt;6,M14,1,16.2,18,18.3,20,26&lt;BR /&gt;1,M15,2,53.8,78,96.5,157,188.14&lt;BR /&gt;2,M15,2,58.2,84.8,120.2,159,227.9&lt;BR /&gt;3,M15,2,52.6,72.33,91.3,114.8,166.4&lt;BR /&gt;4,M15,2,52.6,72.32,91.3,114.8,166.4&lt;BR /&gt;5,M15,2,42,47,64.5,92.3,150.5&lt;BR /&gt;6,M15,2,52.6,72.33,91.3,114.8,166.4&lt;BR /&gt;;;;;&lt;/PRE&gt;
&lt;P&gt;I need to generate boxplots just for percentiles (for each motor_type)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.jpg" style="width: 737px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39551iEC04ACD25D14FA1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.jpg" alt="Untitled.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is it possible with proc boxplot and what is the syntax? Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 08:51:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648497#M19907</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2020-05-18T08:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Boxplot for percintiles only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648510#M19909</link>
      <description>&lt;P&gt;As far as I know, PROC BOXPLOT (and also PROC SGPLOT) doesn't work on pre-computed percentiles. You have to provide the raw data to PROC BOXPLOT (and PROC SGPLOT).&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 10:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648510#M19909</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-05-18T10:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Boxplot for percintiles only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648531#M19910</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/58513"&gt;@DmytroYermak&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC BOXPLOT has an option &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_boxplot_syntax01.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.boxplot.boxplothistory" target="_blank" rel="noopener"&gt;HISTORY=&lt;/A&gt; where you can provide an input dataset &lt;SPAN&gt;containing group summary statistics. However, it must contain a mean value per group (and other statistics not contained in your sample data). Of course, you could set "mean=median," but the mean would still be plotted by default and you would need to modify ODS graphics settings to hide it because for a horizontal box plot you must use ODS graphics. To avoid these complications, I would suggest that you create an ordinary input dataset from your statistics dataset and use PROC SGPLOT, as shown below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data inds(drop=p:);
set motor;
array p p:;
do over p;
  x=p; output;
end;
run;

title 'Box Plot From Summary Statistics';
%let attrs=thickness=2px color=CXE2B977;
proc sgplot data=inds;
by motor_type;
xaxis min=0 label='Parameter';
hbox x / category=level whiskerpct=0 nomean nofill
         lineattrs   =(&amp;amp;attrs)
         medianattrs =(&amp;amp;attrs)
         whiskerattrs=(&amp;amp;attrs);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Edit: This assumes that you want the whiskers to extend to the 10% and 90% quantile (you don't have minimum and maximum in your data anyway). PROC SGPLOT achieves this (using the &lt;FONT face="courier new,courier"&gt;whiskerpct=0&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;extreme&lt;/FONT&gt; option of the HBOX statement) by treating P10 and P90 as minimum and maximum, respectively. P25, P50 and P75 &lt;EM&gt;are&lt;/EM&gt; the three quartiles of the five data points per category (&lt;FONT face="courier new,courier"&gt;level&lt;/FONT&gt;) and BY group in dataset INDS.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 12:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648531#M19910</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-05-18T12:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Boxplot for percintiles only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648562#M19911</link>
      <description>&lt;P&gt;If your data is pre-computed, you will need to use a BOXPLOTPARM statement in GTL. The data structure should look&amp;nbsp;something like the following:&lt;/P&gt;
&lt;TABLE id="p1y06qyaprbgvsn1xzyucf3an1ar" class="xisDoc-table"&gt;&lt;CAPTION class="sr-only"&gt;Statistics Computed for Two Days&lt;/CAPTION&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Day&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TH class="xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;SPAN class="xisDoc-windowItem"&gt;PowerOutputs&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TH class="xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Statistic&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;04JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3180.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;MIN&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;04JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3340.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;Q1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;04JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3487.40&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;MEAN&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;04JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3490.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;MEDIAN&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;04JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3610.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;Q3&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;04JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;4050.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;MAX&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;04JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;20.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;N&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;05JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3179.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;MIN&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;05JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3333.50&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;Q1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;05JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3471.65&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;MEAN&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;05JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3419.50&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;MEDIAN&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;05JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3605.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;Q3&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;05JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;3849.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;MAX&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;05JUL&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;20.00&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;N&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and a simple template would look like the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
  define statgraph boxplotparm1;
    begingraph;
      entrytitle "City Mileage for Vehicle Types";
      layout overlay;
       boxplotparm y=value x=x stat=stat /
         datalabel=datalabel spread=true ;     
      endlayout;
    endgraph;
  end;
run;

/* Generate the plot. */
proc sgrender data=boxdata template=boxplotparm1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=p1db7ll5bzyo4nn1pv31g04etput.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=p1db7ll5bzyo4nn1pv31g04etput.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;for more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 14:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648562#M19911</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-05-18T14:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Boxplot for percintiles only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648569#M19912</link>
      <description>Thank you, Dan!</description>
      <pubDate>Mon, 18 May 2020 14:44:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648569#M19912</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2020-05-18T14:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Boxplot for percintiles only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648573#M19913</link>
      <description>&lt;P&gt;Thank you, Reinhard! Can you please help with option that put both Motor_type on one page? Like this:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled2.jpg" style="width: 689px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39556i3A490BABF2288978/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled2.jpg" alt="Untitled2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 14:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648573#M19913</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2020-05-18T14:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Boxplot for percintiles only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648611#M19914</link>
      <description>&lt;P&gt;Then use the GROUP= option instead of a BY statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Box Plot From Summary Statistics';
%let attrs=thickness=2px;
proc sgplot data=inds;
styleattrs datacontrastcolors=(gray CXE2B977) datalinepatterns=(1 1);
xaxis min=0 label='Parameter';
hbox x / category=level whiskerpct=0 nomean nofill group=motor_type
         lineattrs   =(&amp;amp;attrs)
         medianattrs =(&amp;amp;attrs)
         whiskerattrs=(&amp;amp;attrs);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 May 2020 16:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648611#M19914</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-05-18T16:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Boxplot for percintiles only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648634#M19915</link>
      <description>&lt;P&gt;It is undoubtedly a solution to my case. I just wanted to add that I was able to adapt the code&amp;nbsp;&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2013/03/24/custom-box-plots/#prettyPhoto" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2013/03/24/custom-box-plots/#prettyPhoto&lt;/A&gt;&amp;nbsp;while trying to sort it out:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sgplot data=motor nocycleattrs;
  highlow y=LEVEL high=p90 low=p10 / group=MOTOR_TYPE groupdisplay=cluster
      clusterwidth=0.7;
  highlow y=LEVEL high=p75 low=p25 / group=MOTOR_TYPE type=bar
      groupdisplay=cluster grouporder=ascending clusterwidth=0.7
      barwidth=0.7 name='a';
  highlow y=LEVEL high=p50 low=p50 / group=MOTOR_TYPE type=bar
      groupdisplay=cluster grouporder=ascending clusterwidth=0.7
      barwidth=0.7;
  keylegend 'a';
  xaxis label= "Parameter";
  yaxis label= "Level" reverse;
  run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There is no color and width solution here.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 17:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Boxplot-for-percintiles-only/m-p/648634#M19915</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2020-05-18T17:19:49Z</dc:date>
    </item>
  </channel>
</rss>

