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;
Before Coloring/Styling
I like your holiday graphs! Thanks for posting.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.