BookmarkSubscribeRSS Feed
Lapis Lazuli | Level 10 tc
Lapis Lazuli | Level 10

Happy Thanksgiving!Happy Thanksgiving!


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 88% of Americans reportedly plan to feast on turkey this holiday season. For another SAS ODS Graphics take on waffle charts, check out Abhinav Srivastva's PhUSE US Connect 2021 paper, Waffle Chart in SAS. Happy Thanksgiving, all!


* Fun With SAS ODS Graphics: Thanksgiving Turkey Waffle Chart
  Turkey factoid found at:;

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<=88 then Dinner='Turkey   '; else Dinner='No Turkey';

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 & 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;


TURKEYS (Office365 Turkey Icons)

TurkeyTurkeyNo TurkeyNo Turkey



Look Ma, No Color!Look Ma, No Color!




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 0 replies
  • 1 in conversation