<?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: Four Histograms on One Page in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760350#M240433</link>
    <description>&lt;P&gt;Sure. Here is an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

ods select none;
ods select histogram;

ods listing gpath='c:\temp\';
ods graphics /reset=index imagename="i_20201_" imagefmt=png;

proc univariate data=sashelp.heart;
class status sex;
var weight;
histogram weight/normal kernel;
run;
ods select all;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Aug 2021 12:46:42 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-08-09T12:46:42Z</dc:date>
    <item>
      <title>Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/759248#M239891</link>
      <description>&lt;P&gt;Four different datasets, but similar:&lt;/P&gt;
&lt;P&gt;A,&amp;nbsp;B,&amp;nbsp;C,&amp;nbsp;D&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Contents of each one:&lt;/P&gt;
&lt;P&gt;Parameter&lt;/P&gt;
&lt;P&gt;Count&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to create a graphic with four histograms, one for each dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;A  B
C  D
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I need to then save the graphic:&lt;/P&gt;
&lt;P&gt;ABCD.png&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nicholas Kormanik&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 09:31:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/759248#M239891</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2021-08-04T09:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/759250#M239893</link>
      <description>&lt;P&gt;This might help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2016/03/09/comparative-panel-overlay-histograms-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2016/03/09/comparative-panel-overlay-histograms-sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 09:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/759250#M239893</guid>
      <dc:creator>Norman21</dc:creator>
      <dc:date>2021-08-04T09:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/759252#M239895</link>
      <description>&lt;P&gt;Concatenate the data sets into one, use the Indsname Option and Proc Panel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if you can use this as a template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set A B C D indsname = ds;
run;

proc sgpanel data = want;
   panelby ds / columns = 2;
   histogram Count;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Aug 2021 09:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/759252#M239895</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-08-04T09:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/759299#M239929</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods select histogram;
proc univariate data=sashelp.heart;
class status sex;
var weight;
histogram weight/normal kernel;
run;
ods select all;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Aug 2021 12:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/759299#M239929</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-08-04T12:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760135#M240337</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;Turns out that 2x2 is not necessary.&amp;nbsp; 1x4 looks fine.&amp;nbsp; So sticking for the time being with Proc Univariate....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on / height=1920px width=3413px ;

data sas_1.i_20201;
set
sas_1.sum_i_20201_long_gt
sas_1.sum_i_20201_long_lt
sas_1.sum_i_20201_short_gt
sas_1.sum_i_20201_short_lt
;
run;

ods listing gpath='c:\3\';
ods graphics / imagename="i_20201_" imagefmt=png;

proc univariate data=sas_1.i_20201;
freq Count;
var Parameter;
class Indicator (order=data);
histogram Parameter /
	nrows = 4
	barlabel=count
	href=0
	kernel (c = 0.25 0.50 0.75 1.00
                    l = 1 20 2 34
                    noprint)
	odstitle = "i_20201";

inset
n="n:" (8.0)
max="max:" (8.2)
q3="q3:" (8.2)
mode="mode:" (8.2)
median="median:" (8.2)
mean="mean:" (8.2)
q1="q1:" (8.2)
min="min:" (8.2)
std="std:" (8.2)
/
pos = nw
cfill=blank
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Aug 2021 00:13:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760135#M240337</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2021-08-09T00:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760136#M240338</link>
      <description>If you need producing a 2x2 panel , you need TWO class variables ,both have TWO levels .&lt;BR /&gt;&lt;BR /&gt;class Indicator1  Indicator2 ;</description>
      <pubDate>Sat, 07 Aug 2021 09:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760136#M240338</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-08-07T09:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760280#M240396</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;"&lt;SPAN&gt;Indsname" was crucial in solving the issue at hand.&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;wrote a &lt;A title="Where did it come from?" href="https://blogs.sas.com/content/iml/2015/08/03/indsname-option.html" target="_blank" rel="noopener"&gt;blog&lt;/A&gt; post clearly showing how.&amp;nbsp; Greatly appreciate his continued help here.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 00:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760280#M240396</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2021-08-09T00:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760281#M240397</link>
      <description>&lt;P&gt;One final question related to this post:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really don't need any of the output except the saved .png files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to accomplish this?&amp;nbsp; My hunch is via ODS, but not sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, no output except the histogram graphics file production.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to all of you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 00:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760281#M240397</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2021-08-09T00:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760350#M240433</link>
      <description>&lt;P&gt;Sure. Here is an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

ods select none;
ods select histogram;

ods listing gpath='c:\temp\';
ods graphics /reset=index imagename="i_20201_" imagefmt=png;

proc univariate data=sashelp.heart;
class status sex;
var weight;
histogram weight/normal kernel;
run;
ods select all;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Aug 2021 12:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760350#M240433</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-08-09T12:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Four Histograms on One Page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760501#M240491</link>
      <description>&lt;P&gt;You da man,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;, as usual.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 23:31:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Four-Histograms-on-One-Page/m-p/760501#M240491</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2021-08-09T23:31:20Z</dc:date>
    </item>
  </channel>
</rss>

