Happy Valentine's Day!
* Fun w/SAS ODS Graphics: Be Still My Unicode Valentine Heart;
data heart; /* Plot Unicode hearts of various sizes at x=0 y=-.025 */
xH=0; yH=-.025; txtH=unicode('\u2764'); /* Unicode heart character code is hex 2764 */
ods _all_ close; /* Plot valentine (animated GIF with 5 frames) */
options papersize=('5 in', '5 in') printerpath=gif animation=start animloop=YES NOANIMOVERLAY nodate nonumber;
ods printer file='/home/ted.conway/Valentines.gif';
ods graphics / width=5in height=5in imagefmt=GIF antialias;
%macro valentine;
%do frame=0 %to 4; /* Plot 5 nested Valentine hearts of varying sizes */
%if &frame=0 | &frame=4 %then options animduration=.75; %else options animduration=.25;;
proc sgplot data=heart noautolegend noborder pad=0 aspect=1 nowall subpixel;
styleattrs backcolor=cxffbcd9; /* Cotton candy pink background */
inset " " "HAPPY VALENTINE'S DAY!" / position=top textattrs=(size=22pt color=cxB81B47 weight=bold); /* Bright marooon color */
%do h=&frame %to 0 %by-1; /* Plot biggest hearts first, alternate red and white color */
text x=xH y=yH text=txtH / textattrs=(family="Arial Unicode MS" size=%eval((&h=0)*36+36*&h*5/2)pt color=%if %sysfunc(mod(&h,2))=1 %then WHITE; %else RED;) position=center vcenter=bbox contributeoffsets=none strip;;
%end;
xaxis display=none offsetmin=0 offsetmax=0 values=(-1 1); /* Suppress labels/ticks on axes, set bounds */
yaxis display=none offsetmin=0 offsetmax=0 values=(-1 1);
run;
%end;
%mend;
%valentine;
options printerpath=gif animation=stop;
ods printer close;