<?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 scatter by by hour in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475196#M16446</link>
    <description>&lt;P&gt;I am trying to do a scatterplot with two groups (5 PM and 4 AM) but it also shows overall over the groups making it messy.&lt;/P&gt;&lt;P&gt;I have this:&lt;/P&gt;&lt;PRE&gt;data dataname2;
   set dataname;
   if Hour in (17) then grouphour='5 P.M.';
   if Hour in (4) then grouphour='4 P.M.';
run;

proc sgplot data=dataname2; 
where Month in (6,7,8);
where also Weekday in (1,2,3,4,5);
scatter x=Xvar y=Yvar / group=grouphour;
reg x=Xvar y=Yvar;

title '5 P.M. vs 4 A.M. (summer)';
run;&lt;/PRE&gt;&lt;P&gt;Also, is there an easier way to do this without making new dataset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like group1 = Hour(17) group2 = Hour(4) or something like that?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jul 2018 14:48:15 GMT</pubDate>
    <dc:creator>matt23</dc:creator>
    <dc:date>2018-07-03T14:48:15Z</dc:date>
    <item>
      <title>scatter by by hour</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475196#M16446</link>
      <description>&lt;P&gt;I am trying to do a scatterplot with two groups (5 PM and 4 AM) but it also shows overall over the groups making it messy.&lt;/P&gt;&lt;P&gt;I have this:&lt;/P&gt;&lt;PRE&gt;data dataname2;
   set dataname;
   if Hour in (17) then grouphour='5 P.M.';
   if Hour in (4) then grouphour='4 P.M.';
run;

proc sgplot data=dataname2; 
where Month in (6,7,8);
where also Weekday in (1,2,3,4,5);
scatter x=Xvar y=Yvar / group=grouphour;
reg x=Xvar y=Yvar;

title '5 P.M. vs 4 A.M. (summer)';
run;&lt;/PRE&gt;&lt;P&gt;Also, is there an easier way to do this without making new dataset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like group1 = Hour(17) group2 = Hour(4) or something like that?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 14:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475196#M16446</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-07-03T14:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: scatter by by hour</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475205#M16447</link>
      <description>&lt;P&gt;Do you want the rest of the hours included and only those two hours highlighted? If so, a temp data set is the easiest method.&lt;/P&gt;
&lt;P&gt;Or just those two hours - this is easy adding a condition to your WHERE statement for HOUR.&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;I am trying to do a scatterplot with two groups (5 PM and 4 AM) but it also shows overall over the groups making it messy.&lt;/P&gt;
&lt;P&gt;I have this:&lt;/P&gt;
&lt;PRE&gt;data dataname2;
   set dataname;
   if Hour in (17) then grouphour='5 P.M.';
   if Hour in (4) then grouphour='4 P.M.';
run;

proc sgplot data=dataname2; 
where Month in (6,7,8);
where also Weekday in (1,2,3,4,5);
scatter x=Xvar y=Yvar / group=grouphour;
reg x=Xvar y=Yvar;

title '5 P.M. vs 4 A.M. (summer)';
run;&lt;/PRE&gt;
&lt;P&gt;Also, is there an easier way to do this without making new dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;like group1 = Hour(17) group2 = Hour(4) or something like that?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 14:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475205#M16447</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-03T14:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: scatter by by hour</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475211#M16448</link>
      <description>&lt;P&gt;No, I only want the two hours but on top of them I get both of them combined. I don't want the combined one and I don't know why it even shows.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 15:03:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475211#M16448</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-07-03T15:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: scatter by by hour</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475215#M16449</link>
      <description>&lt;P&gt;Exclude/Include them in the WHERE statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=dataname; 

where Month in (6,7,8)
           and Weekday in (1,2,3,4,5) 
           and hour in (4, 17);

scatter x=Xvar y=Yvar / group=hour;
reg x=Xvar y=Yvar;

title '5 P.M. vs 4 A.M. (summer)';

run&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 15:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/scatter-by-by-hour/m-p/475215#M16449</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-03T15:05:45Z</dc:date>
    </item>
  </channel>
</rss>

