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

SAS ODS GraphicsSAS ODS Graphics Craft Project (Source: Project (Source: 


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;
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;

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




Lapis Lazuli | Level 10
Very Impressive, JD!



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation