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

StPatricksDayWreath.png

 

Happy St. Patrick's Day (and a belated Happy Pi Day), all!

 

* Fun w/SAS ODS Graphics: I'm Dreaming of a Green St. Patrick's Day;

data shamrocks;               * Plot Shamrock icons in a circle to create a St. Patrick's day 'wreath';
retain msg "HAPPY*ST. PATRICK'S*DAY!" msgX 0 MsgY 0;
pi=constant("pi");
do i=1 to 12;                 * Plot 12 points around circle (From blogs.sas.com/content/graphicallyspeaking/2018/11/01/text-plot-can-do-that/);
  angle=90-i*30;
  x=cos(angle*pi/180);
  y=sin(angle*pi/180);
  output;
end;

ods graphics / width=5in height=5in antialias noborder; * St. Patrick's Day 'Wreath' (Scatter + Text Plot);
proc sgplot data=shamrocks noautolegend noborder pad=0 aspect=1 nowall subpixel noborder pad=0;
symbolimage name=shamrock image='/home/ted.conway/shamrock.png'; * MS-Word shamrock icon saved as .png file;
styleattrs backcolor=VPAG;   * Very pale green background;              
scatter x=x y=y / markerattrs=(color=cx009a49 size=80pt symbol=shamrock); * Plot 'shamrocks';
text x=msgY y=msgY text=msg / textattrs=(size=22pt color=cx224d17 weight=bold) position=center splitchar='*' splitpolicy=splitalways contributeoffsets=none strip;; * Message;
xaxis display=none offsetmin=0 offsetmax=0 values=(-1.4 1.4); * Suppress labels/ticks on axes, set bounds;
yaxis display=none offsetmin=0 offsetmax=0 values=(-1.4 1.4);
run;

 

MS-Word Shamrock Icon (saved as .png)MS-Word Shamrock Icon (saved as .png)

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 0 replies
  • 3487 views
  • 5 likes
  • 1 in conversation