<?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: box plots and histogram in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452259#M15510</link>
    <description>&lt;P&gt;I'm not quite sure of what you need. Can you post a picture?&lt;/P&gt;</description>
    <pubDate>Sun, 08 Apr 2018 00:09:00 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2018-04-08T00:09:00Z</dc:date>
    <item>
      <title>box plots and histogram</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452150#M15497</link>
      <description>&lt;P&gt;Due to user complain the difficulty about understanding the meaning of box plot, I ‘translate’ the box plot to histogram. Why the chref=green and whref=3 don’t work in proc univariate? Is there better way to do this?&lt;/P&gt;&lt;PRE&gt;/*Generate box plot: options must have*/
ods pdf  file="&amp;amp;pdfout\box.pdf"  notoc;  
	title; 
	ods graphics / reset=all height=2.7 in width=4.3in;
	ods graphics on / border = off;
	ods graphics on / imagemap=on;
	Title1 h=1.4 j=c font=Arial bold "Age Summary - box";

	proc sgplot data=class; 
	hbox age;  
		refline &amp;amp;ag1 /axis=x  
		lineattrs=(color=green thickness=3) 
		label=("&amp;amp;nm1: &amp;amp;ag1") labelloc=inside;
	run; quit;
ods pdf close;

/*Generate histogram*/
ods pdf  file="&amp;amp;pdfout\hist.pdf"  notoc;  
	title; 
	ods graphics / reset=all height=2.7 in width=4.3in;
	ods graphics on / border = off;
	ods graphics on / imagemap=on;
	Title1 h=1.4 j=c font=Arial bold "Age Summary - hist";
	
	proc univariate data=sashelp.class noprint;
   	histogram age / midpoints = 10 to 20 by 1
             rtinclude
			 href=&amp;amp;ag chref=green  whref=3 hreflabel="&amp;amp;nm1: &amp;amp;ag1"
             outhistogram = OutMdpts;
	run; quit;
ods pdf close;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Apr 2018 02:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452150#M15497</guid>
      <dc:creator>nnl3256</dc:creator>
      <dc:date>2018-04-07T02:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: box plots and histogram</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452155#M15498</link>
      <description>&lt;P&gt;Those options on UNIVARIATE might only work with GRSEG-based output. SGPLOT also has a HISTOGRAM statement, and you can overlay REFLINEs behind or in front of the histogram. You can also control the attributes of the REFLINEs. Here is a simple example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.heart;
histogram cholesterol;
refline 200 / axis=x lineattrs=(color=red thickness=2);
refline 300 / axis=x lineattrs=(color=green thickness=2);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Apr 2018 02:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452155#M15498</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-04-07T02:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: box plots and histogram</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452205#M15501</link>
      <description>&lt;P&gt;Thank you very much. This refline seems a little bit of misleading. What I really need is an indicator to highlight the cross point of age and percent for a student, for example to indicate Carol belongs to 20% distribution group, not necessary a refline. The indicator label should be like “Carol: 14”. Welcome suggestion or creation.&lt;/P&gt;&lt;PRE&gt;proc sql noprint; select name, age into :nm, :ag from sashelp.class where name="Carol"; quit;
%let ag1=&amp;amp;ag; %let nm1=&amp;amp;nm;

proc sgplot data=sashelp.class;
	histogram age ;
	refline &amp;amp;ag / axis=x label ="&amp;amp;nm1: &amp;amp;ag1" labelloc=inside
	lineattrs=(color=green thickness=2);
run;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Apr 2018 14:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452205#M15501</guid>
      <dc:creator>nnl3256</dc:creator>
      <dc:date>2018-04-07T14:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: box plots and histogram</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452259#M15510</link>
      <description>&lt;P&gt;I'm not quite sure of what you need. Can you post a picture?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 00:09:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/452259#M15510</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-04-08T00:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: box plots and histogram</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/453925#M15567</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It was so nice to meet you in person around the SAS Global Forum 2018. I agree with your explanation, i.e., the 'translation' doesn't work well. Thank you.&amp;nbsp; By the way the supper demo is great, and I am thinking to attend in 2019. Hopefully see you there!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 14:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/box-plots-and-histogram/m-p/453925#M15567</guid>
      <dc:creator>nnl3256</dc:creator>
      <dc:date>2018-04-13T14:26:23Z</dc:date>
    </item>
  </channel>
</rss>

