<?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: Turkey Waffle Chart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Turkey-Waffle-Chart/m-p/781678#M22353</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Happy Thanksgiving!" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66010i5FF48EED0134BDA8/image-size/large?v=v2&amp;amp;px=999" role="button" title="turkey.png" alt="Happy Thanksgiving!" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Happy Thanksgiving!&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanksgiving week is upon us, so here's a quick SAS ODS Graphics waffle chart (aka isotype chart, aka pictogram, aka scatter plot!) to display the factoid that &lt;A href="https://www.finder.com/american-thanksgiving-turkey-spend" target="_self"&gt;88% of Americans reportedly plan to feast on turkey&lt;/A&gt; this holiday season. For another SAS ODS Graphics take on waffle charts, check out Abhinav Srivastva's PhUSE US Connect 2021 paper, &lt;A href="https://phuse.s3.eu-central-1.amazonaws.com/Archive/2021/Connect/US/Virtual/PAP_DV06.pdf" target="_self"&gt;Waffle Chart in SAS&lt;/A&gt;. Happy Thanksgiving, 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: Thanksgiving Turkey Waffle Chart
  Turkey factoid found at: finder.com/american-thanksgiving-turkey-spend;

data turkeys;                                                       * Generate 100 points for turkey images(100%);
do p=1 to 100;
  x=floor((p-1)/10);                                                * Fill columns from left to right, rows from bottom to top - (0,0) to (9,9);
  y=mod(p-1,10);                                                    * Assign category - turkey (88%) or no turkey;
  if p&amp;lt;=88 then Dinner='Turkey   '; else Dinner='No Turkey';
  output;
end;

data myattrmap;                                                     * Create attribute map to assign images to categories; 
id="myid"; value='Turkey   '; markersymbol='turkey  '; output;
id="myid"; value='No Turkey'; markersymbol='noturkey'; output;                                          
                                                                    * Generate 'waffle' chart of turkey images (scatter plot of images);
proc sgplot data=turkeys noborder dattrmap=myattrmap nowall noautolegend pad=(top=4pt left=.25in right=.25in bottom=0pt);
styleattrs backcolor=cxFBFBD5;                                      * Light goldenrod yellow background, 'seal brown' text &amp;amp; images; 
inset ' 88% of Americans Plan on Turkey for Thanksgiving ' / textattrs=(size=15.5pt color=cx623004 weight=bold) position=top;
symbolimage name=turkey image='/home/ted.conway/turkey3.png';       * Filled turkey (Office365 turkey icon);
symbolimage name=noturkey image='/home/ted.conway/noturkey3.png';   * Turkey outline (Office365 turkey icon);
scatter x=x y=y / attrid=myid markerattrs=(size=32pt) group=dinner; * Scatter plot w/custom legend;
keylegend 'turkey' 'noturkey' / noborder noopaque position=bottom location=inside;
legenditem type=marker name='turkey'  / markerattrs=(symbol=turkey size=22pt) label='Turkey' labelattrs=(size=12pt weight=bold color=cx623004);
legenditem type=marker name='noturkey' / markerattrs=(symbol=noturkey size=22pt) label='No Turkey' labelattrs=(size=12pt weight=bold color=cx623004);
xaxis display=none; yaxis display=none offsetmin=.13 offsetmax=.13; * Suppress axes, add padding;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TURKEYS&amp;nbsp;&lt;/STRONG&gt;(Office365 Turkey Icons)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Turkey" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66011iA99679FE3AD49E7C/image-size/small?v=v2&amp;amp;px=200" role="button" title="turkey3.png" alt="Turkey" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Turkey&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="No Turkey" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66012iE66664A4ABD75447/image-size/small?v=v2&amp;amp;px=200" role="button" title="noturkey3.png" alt="No Turkey" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;No Turkey&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BLACK &amp;amp; WHITE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Look Ma, No Color!" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66013i6016427B9DC9DB63/image-size/large?v=v2&amp;amp;px=999" role="button" title="turkeyBW.png" alt="Look Ma, No Color!" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Look Ma, No Color!&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 07:29:16 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2021-11-22T07:29:16Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: Turkey Waffle Chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Turkey-Waffle-Chart/m-p/781678#M22353</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Happy Thanksgiving!" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66010i5FF48EED0134BDA8/image-size/large?v=v2&amp;amp;px=999" role="button" title="turkey.png" alt="Happy Thanksgiving!" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Happy Thanksgiving!&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanksgiving week is upon us, so here's a quick SAS ODS Graphics waffle chart (aka isotype chart, aka pictogram, aka scatter plot!) to display the factoid that &lt;A href="https://www.finder.com/american-thanksgiving-turkey-spend" target="_self"&gt;88% of Americans reportedly plan to feast on turkey&lt;/A&gt; this holiday season. For another SAS ODS Graphics take on waffle charts, check out Abhinav Srivastva's PhUSE US Connect 2021 paper, &lt;A href="https://phuse.s3.eu-central-1.amazonaws.com/Archive/2021/Connect/US/Virtual/PAP_DV06.pdf" target="_self"&gt;Waffle Chart in SAS&lt;/A&gt;. Happy Thanksgiving, 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: Thanksgiving Turkey Waffle Chart
  Turkey factoid found at: finder.com/american-thanksgiving-turkey-spend;

data turkeys;                                                       * Generate 100 points for turkey images(100%);
do p=1 to 100;
  x=floor((p-1)/10);                                                * Fill columns from left to right, rows from bottom to top - (0,0) to (9,9);
  y=mod(p-1,10);                                                    * Assign category - turkey (88%) or no turkey;
  if p&amp;lt;=88 then Dinner='Turkey   '; else Dinner='No Turkey';
  output;
end;

data myattrmap;                                                     * Create attribute map to assign images to categories; 
id="myid"; value='Turkey   '; markersymbol='turkey  '; output;
id="myid"; value='No Turkey'; markersymbol='noturkey'; output;                                          
                                                                    * Generate 'waffle' chart of turkey images (scatter plot of images);
proc sgplot data=turkeys noborder dattrmap=myattrmap nowall noautolegend pad=(top=4pt left=.25in right=.25in bottom=0pt);
styleattrs backcolor=cxFBFBD5;                                      * Light goldenrod yellow background, 'seal brown' text &amp;amp; images; 
inset ' 88% of Americans Plan on Turkey for Thanksgiving ' / textattrs=(size=15.5pt color=cx623004 weight=bold) position=top;
symbolimage name=turkey image='/home/ted.conway/turkey3.png';       * Filled turkey (Office365 turkey icon);
symbolimage name=noturkey image='/home/ted.conway/noturkey3.png';   * Turkey outline (Office365 turkey icon);
scatter x=x y=y / attrid=myid markerattrs=(size=32pt) group=dinner; * Scatter plot w/custom legend;
keylegend 'turkey' 'noturkey' / noborder noopaque position=bottom location=inside;
legenditem type=marker name='turkey'  / markerattrs=(symbol=turkey size=22pt) label='Turkey' labelattrs=(size=12pt weight=bold color=cx623004);
legenditem type=marker name='noturkey' / markerattrs=(symbol=noturkey size=22pt) label='No Turkey' labelattrs=(size=12pt weight=bold color=cx623004);
xaxis display=none; yaxis display=none offsetmin=.13 offsetmax=.13; * Suppress axes, add padding;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TURKEYS&amp;nbsp;&lt;/STRONG&gt;(Office365 Turkey Icons)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Turkey" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66011iA99679FE3AD49E7C/image-size/small?v=v2&amp;amp;px=200" role="button" title="turkey3.png" alt="Turkey" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Turkey&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="No Turkey" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66012iE66664A4ABD75447/image-size/small?v=v2&amp;amp;px=200" role="button" title="noturkey3.png" alt="No Turkey" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;No Turkey&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BLACK &amp;amp; WHITE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Look Ma, No Color!" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66013i6016427B9DC9DB63/image-size/large?v=v2&amp;amp;px=999" role="button" title="turkeyBW.png" alt="Look Ma, No Color!" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Look Ma, No Color!&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 07:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Turkey-Waffle-Chart/m-p/781678#M22353</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2021-11-22T07:29:16Z</dc:date>
    </item>
  </channel>
</rss>

