<?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: SGPLOT for mean of more than one month in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-for-mean-of-more-than-one-month/m-p/476117#M30908</link>
    <description>&lt;P&gt;Remove MONTH from your BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216327"&gt;@matt23&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, I have this code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sort data=dataname;
by month hour;
run;

proc means data=dataname noprint;
by month hour;
var Load temperature DewPoint WindSpeed CloudCover;
output out=Meanx mean=;
run;

proc print data=Meanx;
run;

proc sgplot data=Meanx;
where Month in(6);
series x=Hour y=Load / legendlabel = 'Load' MARKERS LINEATTRS = (THICKNESS = 2 PATTERN = SOLID COLOR = LIGHTBLUE) 
													MARKERATTRS =  (COLOR = LIGHTBLUE);
series x=Hour y=Temperature / y2axis legendlabel = 'Temperature' MARKERS LINEATTRS = (THICKNESS = 2 PATTERN = SOLID COLOR = PINK);
XAXIS LABEL = 'Hour' GRID VALUES = (0 TO 23 BY 1);
YAXIS LABEL = 'LOAD (MW)';
Y2AXIS LABEL = 'Temperature (degrees F)';
title 'Hourly Load and Temperature (June)';
run;&lt;/PRE&gt;
&lt;P&gt;but this is for individual month. How can I do that I have one line like this but it represents Month 6,7,8 ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I put 'where Month in (6,7,8) I get 3 separate lines for each month. How can I change my code?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jul 2018 19:16:32 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-07-06T19:16:32Z</dc:date>
    <item>
      <title>SGPLOT for mean of more than one month</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-for-mean-of-more-than-one-month/m-p/476099#M30907</link>
      <description>&lt;P&gt;Hi, I have this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sort data=dataname;
by month hour;
run;

proc means data=dataname noprint;
by month hour;
var Load temperature DewPoint WindSpeed CloudCover;
output out=Meanx mean=;
run;

proc print data=Meanx;
run;

proc sgplot data=Meanx;
where Month in(6);
series x=Hour y=Load / legendlabel = 'Load' MARKERS LINEATTRS = (THICKNESS = 2 PATTERN = SOLID COLOR = LIGHTBLUE) 
													MARKERATTRS =  (COLOR = LIGHTBLUE);
series x=Hour y=Temperature / y2axis legendlabel = 'Temperature' MARKERS LINEATTRS = (THICKNESS = 2 PATTERN = SOLID COLOR = PINK);
XAXIS LABEL = 'Hour' GRID VALUES = (0 TO 23 BY 1);
YAXIS LABEL = 'LOAD (MW)';
Y2AXIS LABEL = 'Temperature (degrees F)';
title 'Hourly Load and Temperature (June)';
run;&lt;/PRE&gt;&lt;P&gt;but this is for individual month. How can I do that I have one line like this but it represents Month 6,7,8 ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I put 'where Month in (6,7,8) I get 3 separate lines for each month. How can I change my code?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 18:16:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-for-mean-of-more-than-one-month/m-p/476099#M30907</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-07-06T18:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT for mean of more than one month</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-for-mean-of-more-than-one-month/m-p/476117#M30908</link>
      <description>&lt;P&gt;Remove MONTH from your BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216327"&gt;@matt23&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, I have this code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sort data=dataname;
by month hour;
run;

proc means data=dataname noprint;
by month hour;
var Load temperature DewPoint WindSpeed CloudCover;
output out=Meanx mean=;
run;

proc print data=Meanx;
run;

proc sgplot data=Meanx;
where Month in(6);
series x=Hour y=Load / legendlabel = 'Load' MARKERS LINEATTRS = (THICKNESS = 2 PATTERN = SOLID COLOR = LIGHTBLUE) 
													MARKERATTRS =  (COLOR = LIGHTBLUE);
series x=Hour y=Temperature / y2axis legendlabel = 'Temperature' MARKERS LINEATTRS = (THICKNESS = 2 PATTERN = SOLID COLOR = PINK);
XAXIS LABEL = 'Hour' GRID VALUES = (0 TO 23 BY 1);
YAXIS LABEL = 'LOAD (MW)';
Y2AXIS LABEL = 'Temperature (degrees F)';
title 'Hourly Load and Temperature (June)';
run;&lt;/PRE&gt;
&lt;P&gt;but this is for individual month. How can I do that I have one line like this but it represents Month 6,7,8 ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I put 'where Month in (6,7,8) I get 3 separate lines for each month. How can I change my code?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 19:16:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-for-mean-of-more-than-one-month/m-p/476117#M30908</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-06T19:16:32Z</dc:date>
    </item>
  </channel>
</rss>

