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

EasterBunnyBasket.png

 

A SAS ODS Graphics take on a cute Easter Bunny Basket icon - Happy Easter, all!

  

* Fun With SAS ODS Graphics: Easter Bunny Basket
  A SAS ODS Graphics take on an icon found at stockio.com/free-icon/easterly-icons-easter-bunny;

*==> 1. Generate points for Easter Bunny's eyes and Easter basket;

data easter;
dash='-'; ty=89; tx=93; output; tx=132; output; dash=""; tx=0; ty=0; * Generate points for eyes (dashes/hyphens(; 
do id=1 to 2; * Generate points for Easter basket (two polygons); 
  input; 
  do w= 1 to countw(_infile_) by 2; px=input(scan(_infile_,w),best3.); py=input(scan(_infile_,w+1),best3.); output; 
  end; 
end;
datalines;
0 121 0 153 225 153 225 121
10 153 33 231 192 231 215 153
;
 *==> 2. Plot Easter Basket/Bunny (Polygon+Ellipse+Text Plots);
 
ods graphics / antialias width=6in height=6in noborder;
proc sgplot aspect=1 noautolegend nowall noborder pad=0; 
styleattrs backcolor=cxfdf0d7; * Pastel yellow background;

* Easter Basket Handle (black outline) + pastel green overlay;
ellipseparm semimajor=103.5 semiminor=103.5 / slope=0 xorigin=112.5 yorigin=121 nofill lineattrs=(color=black thickness=18pt); * Black outline;
ellipseparm semimajor=103.5 semiminor=103.5 / slope=0 xorigin=112.5 yorigin=121 nofill lineattrs=(color=cxc5ebd5 thickness=6pt); * Pastel green;

* Easter Bunny Head (black outline);
ellipseparm semimajor=70 semiminor=70 / slope=0 xorigin=112.5 yorigin=121 nofill lineattrs=(color=black thickness=6pt);

* Easter Bunny Left Ear (white + pink overlay);
ellipseparm semimajor=17 semiminor=47 / slope=0 xorigin=80.5 yorigin=45 fill fillattrs=(color=white) outline lineattrs=(color=black thickness=6pt);
ellipseparm semimajor=11 semiminor=40 / slope=0 xorigin=80.5 yorigin=45 fill fillattrs=(color=cxe8a9d0);

* Easter Bunny Right Ear (white + pink overlay);
ellipseparm semimajor=17 semiminor=47 / slope=0 xorigin=144.5 yorigin=45 fill fillattrs=(color=white) outline lineattrs=(color=black thickness=6pt);
ellipseparm semimajor=11 semiminor=40 / slope=0 xorigin=144.5 yorigin=45 fill fillattrs=(color=cxe8a9d0); 

* Easter Bunny - Face (white fill color to cover unwanted lines);
ellipseparm semimajor=68semiminor=68 / slope=0 xorigin=112.5 yorigin=121 fill fillattrs=(color=white);

* Easter Bunny Eyes (black hyphen/dash);
text x=tx y=ty text=dash / contributeoffsets=none textattrs=(color=black weight=bold size=72pt);

* Easter Basket (pastel green);
polygon x=px y=py id=id / lineattrs=(color=black thickness=6pt) fill outline fillattrs=(color=cxc5ebd5); * Pastel green;

xaxis display=none values=(-5 230) offsetmin=.01 offsetmax=.01; * Suppress axes, tweak positionl; yaxis display=none values=(-5 230) reverse offsetmin=.01 offsetmax=.03; run;

  

Chart without code changes to color/tweak output.Chart without code changes to color/tweak output.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 933 views
  • 7 likes
  • 1 in conversation