Inspired by Make Something Pretty's cute Create a Bunny out of Circles Craft Project post - and in particular its accompanying Ikea-like wordless instructions - here comes Peter Cottontail. Have a Happy Easter, all!
* Fun w/SAS ODS Graphics: 4-Circle Easter Bunny
SAS ODS Graphics take on Make Something Pretty's cute "Create a Bunny out of Circles" Craft Project
https://mailsomethingpretty.com/create-a-bunny-out-of-circles;
data easterbunny; * Create a "dummy" point for plotting;
retain x 2.5 y 2.5 msg "";
ods graphics / height=5in width=5in; * 5" square image;
proc sgplot data=easterbunny nowall noautolegend aspect=1 pad=0; * Here comes Peter Cottontail!;
styleattrs backcolor=pappk; * Pale pink Easter-ish background;
* 1. Plot left and right bunny ears first (circle segments);
ellipseparm semimajor=.6875 semiminor=.6875 / slope=1 xorigin=2.3625 yorigin=4 fill fillattrs=(color=black); * 1 3/8" black circle for left/right bunny ears;
lineparm slope=. x=2.240625 y=2.5 / clip lineattrs=(color=pappk pattern=shortdash thickness=2pt); * Dashed vertical line to indicate circle is to be cut to get left ear;
lineparm slope=. x=2.484375 y=2.5 / clip lineattrs=(color=pappk pattern=shortdash thickness=2pt); * Dashed vertical line to indicate circle is to be cut to get right ear;
ellipseparm semimajor=.6875 semiminor=.6875 / slope=1 xorigin=1.8125 yorigin=2.3125 fill fillattrs=(color=black); * Start with whole circle for left bunny ear;
ellipseparm semimajor=.6875 semiminor=.6875 / slope=1 xorigin=3.1875 yorigin=2.3125 fill fillattrs=(color=black); * Start with whole circle for right bunny ear;
lineparm slope=-1.6 x=1 y=2.5 / clip lineattrs=(color=pappk thickness=108pt); * Use thick line to "crop" left bunny ear to get circle segment;
lineparm slope=1.6 x=4 y=2.5 / clip lineattrs=(color=pappk thickness=108pt); * Use thick line to "crop" right bunny ear to get circle segment;
* 2. Display rest of circle "parts list" at top of image;
ellipseparm semimajor=.6875 semiminor=.6875 / slope=1 xorigin=0.8375 yorigin=4 fill fillattrs=(color=black); * 1 3/8" black circle for bunny body;
ellipseparm semimajor=.5 semiminor=.5 / slope=1 xorigin=3.7 yorigin=4 fill fillattrs=(color=black); * 1" black circle for bunny head;
ellipseparm semimajor=.25 semiminor=.25 / slope=1 xorigin=4.6 yorigin=4 fill fillattrs=(color=white); * 1/2" white circle for bunny tail;
* 3. Draw rest of bunny (head, body, tail);
ellipseparm semimajor=.6875 semiminor=.6875 / slope=1 xorigin=2.5 yorigin=1 fill fillattrs=(color=black); * Bunny body;
ellipseparm semimajor=.5 semiminor=.5 / slope=1 xorigin=2.5 yorigin=1.85 fill fillattrs=(color=black); * Bunny head;
ellipseparm semimajor=.25 semiminor=.25 / slope=1 xorigin=2.5 yorigin=.85 fill fillattrs=(color=white); * Bunny tail;
text x=x y=y text=msg; * Just a "dummy" point (needed for plotting ellipses);
inset "Happy" "Easter!" / noborder textattrs=(color=white weight=bold size=18pt) position=bottomleft; * Send Easter greetings;
inset "2023" / noborder textattrs=(color=white weight=bold size=18pt) position=bottomright; * With INSET statements;
xaxis display=none values=(0 to 5 by 5) offsetmin=0 offsetmax=0; * Hide and scale x-axis;
yaxis display=none values=(0 to 5 by 5) offsetmin=0 offsetmax=0; * Hide and scale y-axis;
run;
TC - truly a man for all seasons!
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.