<?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: Happy Father's Day (Polygon+Ellipse Plots) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Happy-Father-s-Day-Polygon-Ellipse/m-p/819078#M22919</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fathersday.png" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72442i1457E29868ACE796/image-size/large?v=v2&amp;amp;px=999" role="button" title="fathersday.png" alt="fathersday.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a bit late in the Father's Day, but here's a quick SAS ODS Graphics knockoff of Ates Evren Aydinel's &lt;A href="https://thenounproject.com/icon/father-479841/" target="_self"&gt;neat father icon&lt;/A&gt;, in which I cut a few corners by not cutting the rectangle corners with ovals.&amp;nbsp;&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;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun With SAS ODS Graphics: Happy Father's Day (Polygon+Ellipse Plots)
  Inspired by and points courtesy of Ates Evren Aydinel from 'father' icon, thenounproject.com/icon/father-479841;

%macro circle(x=,y=,r=);                        * Macro to output circle data - x/y points + diameter;
cx=&amp;amp;x; cy=&amp;amp;y; d=&amp;amp;r; output circles; 
%mend;

%macro rectangle(points) / parmbuff;            * Macro outputs rectangle data - 4 pairs of x/y points + polygon ID + group ID;
polygon+1; group=1;                             * Increment polygon ID, group ID is constant;  
%do n=1 %to 7 %by 2;                            * Generate 4 pairs of x/y points; 
  rx=%scan(%str(&amp;amp;syspbuff),&amp;amp;n);                 * Syspbuff contains all macro parameters;
  ry=%scan(%str(&amp;amp;syspbuff),%eval(&amp;amp;n+1));
  output rectangles;
%end;
%mend;

data circles(keep=cx cy d) rectangles(keep=rx ry polygon group);
%circle(x=317, y=107, r=67);                    * Dad head;
%rectangle(271,192 363,192 363,443 271,443);    * Dad torso;
%rectangle(183,232 275,232 275,272 183,272);    * Dad arm;
%circle(x=145, y=125, r=38);                    * Child head;
%rectangle(121,175 169,175 169,310 121,310);    * Child torso;
%rectangle(165,190 216,190 216,216 165,216);    * Child arm;

data circlesrectangles; set circles rectangles; * Merge circle + rectangle data into one dataset for charting;

ods graphics / reset height=5in width=5in; 
proc sgplot data=circlesrectangles aspect=1 noborder nowall noautolegend;                          * Ellipse+Polygon plot of father holding child;
ellipseparm semimajor=d semiminor=d / xorigin=cx yorigin=cy fill fillattrs=(color=black);          * Draw circles;
polygon x=rx y=ry id=polygon / fill nooutline fillattrs=(color=black) group=group nomissinggroup;  * Draw rectangles; 
xaxis display=none min=0 max=500 offsetmax=.001 offsetmin=.001;                                    * Limit x/y axis bounds;
yaxis display=none min=0 max=500 offsetmax=.001 offsetmin=.001 reverse;
inset "HAPPY FATHER'S DAY!" / position=bottom textattrs=(size=14pt weight=bold color=black);       * Message at bottom;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pre-Fill" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72443iE782157526A7A506/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fathersdayunfilled.png" alt="Pre-Fill" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Pre-Fill&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 19 Jun 2022 21:28:31 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2022-06-19T21:28:31Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: Happy Father's Day (Polygon+Ellipse Plots)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Happy-Father-s-Day-Polygon-Ellipse/m-p/819078#M22919</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fathersday.png" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72442i1457E29868ACE796/image-size/large?v=v2&amp;amp;px=999" role="button" title="fathersday.png" alt="fathersday.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a bit late in the Father's Day, but here's a quick SAS ODS Graphics knockoff of Ates Evren Aydinel's &lt;A href="https://thenounproject.com/icon/father-479841/" target="_self"&gt;neat father icon&lt;/A&gt;, in which I cut a few corners by not cutting the rectangle corners with ovals.&amp;nbsp;&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;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun With SAS ODS Graphics: Happy Father's Day (Polygon+Ellipse Plots)
  Inspired by and points courtesy of Ates Evren Aydinel from 'father' icon, thenounproject.com/icon/father-479841;

%macro circle(x=,y=,r=);                        * Macro to output circle data - x/y points + diameter;
cx=&amp;amp;x; cy=&amp;amp;y; d=&amp;amp;r; output circles; 
%mend;

%macro rectangle(points) / parmbuff;            * Macro outputs rectangle data - 4 pairs of x/y points + polygon ID + group ID;
polygon+1; group=1;                             * Increment polygon ID, group ID is constant;  
%do n=1 %to 7 %by 2;                            * Generate 4 pairs of x/y points; 
  rx=%scan(%str(&amp;amp;syspbuff),&amp;amp;n);                 * Syspbuff contains all macro parameters;
  ry=%scan(%str(&amp;amp;syspbuff),%eval(&amp;amp;n+1));
  output rectangles;
%end;
%mend;

data circles(keep=cx cy d) rectangles(keep=rx ry polygon group);
%circle(x=317, y=107, r=67);                    * Dad head;
%rectangle(271,192 363,192 363,443 271,443);    * Dad torso;
%rectangle(183,232 275,232 275,272 183,272);    * Dad arm;
%circle(x=145, y=125, r=38);                    * Child head;
%rectangle(121,175 169,175 169,310 121,310);    * Child torso;
%rectangle(165,190 216,190 216,216 165,216);    * Child arm;

data circlesrectangles; set circles rectangles; * Merge circle + rectangle data into one dataset for charting;

ods graphics / reset height=5in width=5in; 
proc sgplot data=circlesrectangles aspect=1 noborder nowall noautolegend;                          * Ellipse+Polygon plot of father holding child;
ellipseparm semimajor=d semiminor=d / xorigin=cx yorigin=cy fill fillattrs=(color=black);          * Draw circles;
polygon x=rx y=ry id=polygon / fill nooutline fillattrs=(color=black) group=group nomissinggroup;  * Draw rectangles; 
xaxis display=none min=0 max=500 offsetmax=.001 offsetmin=.001;                                    * Limit x/y axis bounds;
yaxis display=none min=0 max=500 offsetmax=.001 offsetmin=.001 reverse;
inset "HAPPY FATHER'S DAY!" / position=bottom textattrs=(size=14pt weight=bold color=black);       * Message at bottom;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pre-Fill" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72443iE782157526A7A506/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fathersdayunfilled.png" alt="Pre-Fill" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Pre-Fill&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jun 2022 21:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Happy-Father-s-Day-Polygon-Ellipse/m-p/819078#M22919</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2022-06-19T21:28:31Z</dc:date>
    </item>
  </channel>
</rss>

