It wouldn't be Thanksgiving without a SAS ODS Graphics pumpkin pie, right? Happy Thanksgiving, all!
* Fun w/SAS ODS Graphics: Happy Thanksgiving Pumpkin Pie Plot (Ellipse + Spline + Text Plots);
data pumpkinpie; * Generate points for graph;
retain tx ty 0 msg "HAPPY*THANKSGIVING!";
output; tx=.; tx=.; * Display "Happy Thanksgiving!" text greeting at origin (0,0);
do theta=0 to 2*constant("pi")+.1 by .01; * Generate points around a circle for rippled "pie crust";
r=1+0.04*sin(28*theta); * Use sine function to vary radius for ripple effect;
x=r*cos(theta); * A little trigonometry to get x-coordinate;
y=r*sin(theta); * And y-coordinate;
output;
end;
proc sgplot noautolegend aspect=1; * Let's "bake" a pumpkin pie!;
ellipseparm semimajor=1 semiminor=1 / slope=0 xorigin=0 yorigin=0 fill fillattrs=(color=cxC3540C); * PUmpkin pie "filling";
spline x=x y=y / lineattrs=(thickness=12pt color=cxf2d89f); * Pie "crust";
text x=tx y=ty text=msg / backlight=1 contributeoffsets=none textattrs=(size=22pt weight=bold color=white) splitchar='*' splitpolicy=splitalways contributeoffsets=none; * "Happy Thanksgiving!" message;
run;
I like your holiday graphs! Thanks for posting.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.