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

SAS ODS GraphicsSAS ODS Graphics Craft Project (Source: itsmejd.com)Craft Project (Source: itsmejd.com) 

 

With the Halloween weekend upon us, here's a SAS ODS Graphics Polygon + Bubble + Text + Lineparm + Ellipseparm plot take on a DIY Halloween Card craft project from the it's me,JD blog (parabola math refresher here). Happy Halloween, all!

 

 * Fun With SAS ODS Graphics: Para-boo!-la Halloween Card
   SAS ODS Graphics take on craft project at itsmejd.com/easy-diy-halloween-cards-make-minimal-supplies/;
  
data paraBOOla;                                                      * Generate x-y point coordinates, text for charts;
retain id 1;                                                         * Polygons require ID #;
/*Polygon*/ do x=-3.3 to 3.3 by .1; y=x**2/-4*2.5+1.95; output; end; * Parabola formula used to draw top of 'ghost';
            y=-6; output; x=-3.3; output;                            * Close off polygon with rectangular bottom of 'ghost';
/*Eyes   */ x=.; x2=-0.75; y=-.25; size=.35; output; x2=.75; output; * Eyes of 'ghost';
/*Text1  */ x2=.; x3=0; y=-3.5; txt='boo!              '; output;    * Add some text to card;  
/*Text2  */ x3=.; x4=2.9; y=-4.75; txt='HAPPY HALLOWEEN'; output;
/*Circles*/ x4=.; r=.6; do x5=-2.5 to 2.5 by 1; output; end;         * Circles (r=radius) used to draw bottom of 'ghost';

ods graphics / reset width=6in height=8in antialias ; 
proc sgplot data=paraBOOla nowall pad=0 noautolegend subpixel;       * Let's make a Halloween card!;
styleattrs backcolor=cxFE9A0A;                                       * 'Halloween orange';
polygon x=x y=y id=id / fillattrs=(color=white) fill lineattrs=(color=white); * Parabola 'ghost'; 
bubble x=x2 y=y size=size / fillattrs=(color=black) dataskin=matte bradiusmin=.5 bradiusmax=.5 absscale; * Eyes (bubbles w/radius=.5);
text x=x3 y=y text=txt / backlight=1 textattrs=(color=white weight=bold size=90pt) contributeoffsets=none; * Boo! with backlight effect;
text x=x4 y=y text=txt / textattrs=(color=black weight=bold size=21pt) position=left contributeoffsets=none; * Happy Halloween;
lineparm x=-3.1 y=-5 slope=0 / lineattrs=(color=black thickness=3pt) clip; * Line separator;                  
ellipseparm semimajor=r semiminor=r / xorigin=x5 yorigin=-6.2 clip fillattrs=(color=cxFE9A0A) fill; * Circles at bottom of 'ghost' (cheesy drape effect!);
xaxis display=none values=(-3 3) offsetmin=0 offsetmax=0 thresholdmin=0 thresholdmax=0; * Limit x range to 'crop' ghost at sides;
yaxis display=none values=(-6 2.2) offsetmax=0;                      * Limit y-range;
run;

Para-boo!-la: First DraftPara-boo!-la: First Draft

 

 

 

1 REPLY 1
whymath
Barite | Level 11
Very Impressive, JD!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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 lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 1615 views
  • 13 likes
  • 2 in conversation