<?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: Fun With SAS ODS Graphics: Mother and Child (Polygon+Ellipse+Vector Plots) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Mother-and-Child-Polygon-Ellipse/m-p/812057#M22827</link>
    <description>&lt;P&gt;Wow! This takes me way back to when I actually used a physical plotter holding a sight pen which contained a lens plus cross-hairs to physically digitize a picture. Nice to know you can do it all virtually now!&lt;/P&gt;</description>
    <pubDate>Mon, 09 May 2022 02:37:19 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2022-05-09T02:37:19Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: Mother and Child (Polygon+Ellipse+Vector Plots)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Mother-and-Child-Polygon-Ellipse/m-p/812055#M22826</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mothersday.png" style="width: 701px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71219iB6B4277B36A9FE95/image-size/large?v=v2&amp;amp;px=999" role="button" title="mothersday.png" alt="mothersday.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A bit late in the day, but Happy Mother's Day, 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: Mother and Child (Polygon+Ellipse+Vector Plots)
  Points courtesy of Fahmihorizon from Mother icon (thenounproject.com/icon/mother-1477298)
  X/Y coordinates obtained via the nifty PlotDigitizer app (plotdigitizer.com); 

data mom;                                 * Generate required points;  
input x y desc $30.;
select (desc);
  when ('Mom - Head - Center') do; mhcx=x; mhcy=y; input mhrx mhry desc $30.; mhr=mhrx-mhcx; output; end; 
  when ('Mom - Body') do; mbx=x; mby=y; polygon=1; group=1; output; end;
  when ('Carriage Top - Center') do; ctcx=x; ctcy=y; input ctlx ctly desc $30.; ctr=ctcx-ctlx; output; retain ctcx; end; 
  when ('Carriage Bottom - Top Center') do;   * Note: Carriage is an ellipse masked with a polygon and bisected with a line; 
    cbtcx=x; cbtcy=y; input cbbcx cbbcy desc $30.; input cbtrx cbtry desc $30.; cbr2=cbtrx-cbbcx; cbr1=cbtcy-cbbcy; output;   
    polygonM=1; groupM=1; xM=ctcx; yM=cbtcy; output; yM+(cbtrx-cbbcx)+.01; output; xM=cbtcx+(cbtcy-cbbcy)+.01; output; yM=cbtcy; 
    vx=xM+.01; vy=yM; vxo=cbtcx-(cbtcy-cbbcy)-.01; vyo=yM; output; end;
  when ('Left Wheel - Center') do; lwcx=x; lwcy=y; input lwtx lwty desc $30.; lwr=lwty-lwcy; output; end; 
  when ('Right Wheel - Center') do; rwcx=x; rwcy=y; input rwtx rwty desc $30.; rwr=rwty-rwcy; output; end;
  when ('Handle') do; hx=x; hy=y+.01; input hxo hyo desc $30.; hyo+(-.01); output; end;
end;                                      * Digitized points obtained via PlotDigitizer app (plotdigitizer.com); 
datalines;    
0.544594595 0.75261324  Mom - Body
0.468918919 0.534843206 Mom - Body
0.501351351 0.515679443 Mom - Body
0.559459459 0.681184669 Mom - Body
0.513513514 0.402439024 Mom - Body
0.555405405 0.400696864 Mom - Body
0.555405405 0.158536585 Mom - Body
0.595945946 0.156794425 Mom - Body
0.601351351 0.400696864 Mom - Body
0.612162162 0.400696864 Mom - Body
0.62027027  0.156794425 Mom - Body
0.659459459 0.156794425 Mom - Body
0.659459459 0.400696864 Mom - Body
0.705405405 0.400696864 Mom - Body
0.656756757 0.679442509 Mom - Body
0.709459459 0.520905923 Mom - Body
0.745945946 0.534843206 Mom - Body
0.67027027  0.75261324  Mom - Body
0.608108108 0.834494774 Mom - Head - Center
0.660810811 0.834494774 Mom - Head - Right
0.241891892 0.168989547 Left Wheel - Center
0.241891892 0.205574913 Left Wheel - Top
0.440540541 0.170731707 Right Wheel - Center
0.440540541 0.203832753 Right Wheel - Top
0.328378378 0.350174216 Carriage Top - Center
0.2         0.350174216 Carriage Top - Left
0.337837838 0.339721254 Carriage Bottom - Top Center
0.337837838 0.177700348 Carriage Bottom - Bottom Center
0.483783784 0.337979094 Carriage Bottom - Top Right
0.483783784 0.524390244 Handle
0.47027027  0.339721254 Handle
;                                       * Generate chart of mother/child (Polygon+Ellipse+Vector plots);     
ods graphics / reset height=5.7in width=7.3in;;
proc sgplot data=mom aspect=1 noborder nowall noautolegend;
styleattrs backcolor=cxf10427; 
ellipseparm semimajor=mhr semiminor=mhr / xorigin=mhcx yorigin=mhcy fill fillattrs=(color=white);       * Head;
polygon x=mbx y=mby id=polygon / fill fillattrs=(color=white) group=group nomissinggroup;               * Body; 
ellipseparm semimajor=lwr semiminor=lwr / xorigin=lwcx yorigin=lwcy fill fillattrs=(color=white);       * Left carriage wheel;
ellipseparm semimajor=rwr semiminor=rwr / xorigin=rwcx yorigin=rwcy fill fillattrs=(color=white);       * Right carriage wheel;
ellipseparm semimajor=cbr1 semiminor=cbr2 / xorigin=cbtcx yorigin=cbtcy fill fillattrs=(color=white);   * Baby carriage;
polygon x=xM y=yM id=polygonM / fill fillattrs=(color=cxf10427) group=groupM nomissinggroup;            * Mask top right of ellipse to create sunscreen cover;
vector x=vx y=vy / xorigin=vxo yorigin=vyo noarrowheads lineattrs=(color=cxf10427 thickness=3pt);       * Bisect ellipese with a line;
vector x=hx y=hy / xorigin=hxo yorigin=hyo noarrowheads lineattrs=(color=white thickness=5pt);          * Carriage handle;
xaxis display=none min=-.05 max=.95 offsetmax=.001 offsetmin=.001;                                      * Limit x/y axis bounds;
yaxis display=none min=0 max=1 offsetmax=.001 offsetmin=.001;
inset "HAPPY MOTHER'S DAY!" / position=bottom textattrs=(size=14pt weight=bold color=white);            * 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="Grabbing x/y points with Plot Digitizer" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71216i8F95D7124BD6EBF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="plotdigitizer.png" alt="Grabbing x/y points with Plot Digitizer" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Grabbing x/y points with Plot Digitizer&lt;/span&gt;&lt;/span&gt;&lt;/P&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="Chart-in-Progress Pre-Fill &amp;quot;Wireframe&amp;quot;" style="width: 701px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71220i04744C3741B61169/image-size/large?v=v2&amp;amp;px=999" role="button" title="mothersdaywire.png" alt="Chart-in-Progress Pre-Fill &amp;quot;Wireframe&amp;quot;" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Chart-in-Progress Pre-Fill "Wireframe"&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 02:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Mother-and-Child-Polygon-Ellipse/m-p/812055#M22826</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2022-05-09T02:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Fun With SAS ODS Graphics: Mother and Child (Polygon+Ellipse+Vector Plots)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Mother-and-Child-Polygon-Ellipse/m-p/812057#M22827</link>
      <description>&lt;P&gt;Wow! This takes me way back to when I actually used a physical plotter holding a sight pen which contained a lens plus cross-hairs to physically digitize a picture. Nice to know you can do it all virtually now!&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 02:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Mother-and-Child-Polygon-Ellipse/m-p/812057#M22827</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-05-09T02:37:19Z</dc:date>
    </item>
  </channel>
</rss>

