<?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 Fun With SAS ODS Graphics: Stars and Popsicle Stick Stripes Forever in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Stars-and-Popsicle-Stick-Stripes/m-p/934498#M24745</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PopsicleStickFlag.png" style="width: 576px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98099i61C5A15328C97E71/image-size/large?v=v2&amp;amp;px=999" role="button" title="PopsicleStickFlag.png" alt="PopsicleStickFlag.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did my share of popsicle stick craft projects as a kid, including "&lt;A href="https://www.instructables.com/Popsickle-Stick-Switchblade/" target="_self"&gt;switch blades&lt;/A&gt;" and&amp;nbsp;"&lt;A href="https://www.instructables.com/Popsicle-Stick-Bomb/" target="_self"&gt;bombs&lt;/A&gt;." &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, with Independence Day approaching, here's a quick SAS ODS Graphics take on a &lt;A href="https://gingersnapcrafts.com/blast-from-past-popsicle-stick-flags/" target="_self"&gt;Popsicle Stick American Flag&lt;/A&gt;&amp;nbsp;craft project. Happy 4th of July, all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun With SAS ODS Graphics: Stars and Popsicle Stick Stripes Forever
  See craft projoect at: gingersnapcrafts.com/blast-from-past-popsicle-stick-flags;
  
data stripes;                        * Generate rectangles for 5 popsicle stick stripes;
do id=1 to 5;
  color=mod(id,2);                   * Assign color codes 0=Red 1=White 2=Blue;   
  x=.33; y=(id-1)*.72; output; x=6-.33; output; y=(id-1)*.72+.66; output; x=.33; output;
end;

data canton;                          * Generate 3 shorter blue rectangles for canton;
do id=3 to 5;
  csx=.33; csy=(id-1)*.72; output; csx=3; output; csy=(id-1)*.72+.66; output; csx=.33; output;
end;

data circles(keep=colorc xc yc);     * Generate circles for rounded ends of popsicle stick stripes;
do id=1 to 5; 
  if id&amp;lt;=2 then colorc=mod(id,2); else colorc=2; 
  xc=.33; yc=(id-1)*.72+.33; output; colorc=mod(id,2); xc=6-.33; output; 
end;

data stars(keep=xs ys);               * Generate 3 rows of stars (5 in each row); 
do id=3 to 5; 
  ys=(id-1)*.72+.37; 
  do s=1 to 5; xs=s*3/6; output; end; 
end;

data flag;                            * Pull all the pieces together;
set stripes circles canton stars; 
                                      * Make a flag with polygon + ellipseparm + scatter plots!; 
ods graphics / noborder height=3.54in width=6in;
proc sgplot data=flag noautolegend nowall noborder;
styleattrs backcolor=cxb1e5ff datacolors=(CXB22234 white CX3C3B6E);     * "Old Glory Red/Blue";
symbolchar name=uniStar char='2605'x; * Unicode value for 5-pointed star;
polygon x=x y=y id=id / nooutline fill colormodel=(white CXB22234) colorresponse=color nomissinggroup; * Plot rectangular part of stripes; 
ellipseparm semimajor=.33 semiminor=.33 / slope=1 xorigin=xc yorigin=yc fill nooutline group=colorc nomissinggroup; * Plot rounded ends of stripes;
polygon x=csx y=csy id=id / nooutline fill fillattrs=(color=CX3C3B6E);  * Plot canton; 
scatter x=xS y=yS / markerattrs=(symbol=unistar color=White size=48pt); * Plot stars;
xaxis display=none values=(0 6) offsetmin=.06 offsetmax=.06;            * Hide axes; 
yaxis display=none values=(0 3.6) offsetmin=.0625 offsetmax=.06;             
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PRE-COLORING&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PopsicleStickFlagBW.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98103iE3C41FD98BFF352D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PopsicleStickFlagBW.png" alt="PopsicleStickFlagBW.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2024 03:33:18 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2024-07-03T03:33:18Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: Stars and Popsicle Stick Stripes Forever</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Stars-and-Popsicle-Stick-Stripes/m-p/934498#M24745</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PopsicleStickFlag.png" style="width: 576px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98099i61C5A15328C97E71/image-size/large?v=v2&amp;amp;px=999" role="button" title="PopsicleStickFlag.png" alt="PopsicleStickFlag.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did my share of popsicle stick craft projects as a kid, including "&lt;A href="https://www.instructables.com/Popsickle-Stick-Switchblade/" target="_self"&gt;switch blades&lt;/A&gt;" and&amp;nbsp;"&lt;A href="https://www.instructables.com/Popsicle-Stick-Bomb/" target="_self"&gt;bombs&lt;/A&gt;." &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, with Independence Day approaching, here's a quick SAS ODS Graphics take on a &lt;A href="https://gingersnapcrafts.com/blast-from-past-popsicle-stick-flags/" target="_self"&gt;Popsicle Stick American Flag&lt;/A&gt;&amp;nbsp;craft project. Happy 4th of July, all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun With SAS ODS Graphics: Stars and Popsicle Stick Stripes Forever
  See craft projoect at: gingersnapcrafts.com/blast-from-past-popsicle-stick-flags;
  
data stripes;                        * Generate rectangles for 5 popsicle stick stripes;
do id=1 to 5;
  color=mod(id,2);                   * Assign color codes 0=Red 1=White 2=Blue;   
  x=.33; y=(id-1)*.72; output; x=6-.33; output; y=(id-1)*.72+.66; output; x=.33; output;
end;

data canton;                          * Generate 3 shorter blue rectangles for canton;
do id=3 to 5;
  csx=.33; csy=(id-1)*.72; output; csx=3; output; csy=(id-1)*.72+.66; output; csx=.33; output;
end;

data circles(keep=colorc xc yc);     * Generate circles for rounded ends of popsicle stick stripes;
do id=1 to 5; 
  if id&amp;lt;=2 then colorc=mod(id,2); else colorc=2; 
  xc=.33; yc=(id-1)*.72+.33; output; colorc=mod(id,2); xc=6-.33; output; 
end;

data stars(keep=xs ys);               * Generate 3 rows of stars (5 in each row); 
do id=3 to 5; 
  ys=(id-1)*.72+.37; 
  do s=1 to 5; xs=s*3/6; output; end; 
end;

data flag;                            * Pull all the pieces together;
set stripes circles canton stars; 
                                      * Make a flag with polygon + ellipseparm + scatter plots!; 
ods graphics / noborder height=3.54in width=6in;
proc sgplot data=flag noautolegend nowall noborder;
styleattrs backcolor=cxb1e5ff datacolors=(CXB22234 white CX3C3B6E);     * "Old Glory Red/Blue";
symbolchar name=uniStar char='2605'x; * Unicode value for 5-pointed star;
polygon x=x y=y id=id / nooutline fill colormodel=(white CXB22234) colorresponse=color nomissinggroup; * Plot rectangular part of stripes; 
ellipseparm semimajor=.33 semiminor=.33 / slope=1 xorigin=xc yorigin=yc fill nooutline group=colorc nomissinggroup; * Plot rounded ends of stripes;
polygon x=csx y=csy id=id / nooutline fill fillattrs=(color=CX3C3B6E);  * Plot canton; 
scatter x=xS y=yS / markerattrs=(symbol=unistar color=White size=48pt); * Plot stars;
xaxis display=none values=(0 6) offsetmin=.06 offsetmax=.06;            * Hide axes; 
yaxis display=none values=(0 3.6) offsetmin=.0625 offsetmax=.06;             
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PRE-COLORING&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PopsicleStickFlagBW.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98103iE3C41FD98BFF352D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PopsicleStickFlagBW.png" alt="PopsicleStickFlagBW.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 03:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Stars-and-Popsicle-Stick-Stripes/m-p/934498#M24745</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2024-07-03T03:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Fun With SAS ODS Graphics: Stars and Popsicle Stick Stripes Forever</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Stars-and-Popsicle-Stick-Stripes/m-p/934888#M24753</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;&amp;nbsp;&amp;nbsp;never disappoints!&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2024 19:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Stars-and-Popsicle-Stick-Stripes/m-p/934888#M24753</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2024-07-06T19:21:30Z</dc:date>
    </item>
  </channel>
</rss>

