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

Heart-of-Hearts ValentineHeart-of-Hearts Valentine

 

Lifted some heart code from my "MOM tattoo", tweaked the red, filled it with valentine icons from The Noun Project, and voila - Happy Valentine's Day!

 

* Fun With SAS ODS Graphics: Heart-of-Hearts Valentine (Polygon+Scatter+Series Plots)
  Love icon courtesy of resty_agnesia, thenounproject.com/search/?q=valentine+heart&i=1535750;

data Heart;                                                     * Generate data for plots;
do t = 0 to 2*constant("pi") by 0.01;                           * X/Y=Points for red heart polygon;
  r=sin(t)*sqrt(abs(cos(t)))/(sin(t)+7/5)-2*sin(t)+2;
  x = r*cos(t);        
  y = r*sin(t);
  id=1;
  output;
end;
x=.; y=.; id=.;
do r=-3 to 3 by .5;                                             * X2/Y2=Points for white heart icon markers;
  do l=-5.15 to 3 by .5;
    x2=r; y2=l; output;                                         
    x2=r+.25; y2=l+.25; output;                                 * Offset heart icon markers from previous line;
  end;  
end;

ods graphics / reset antialias width=5in height=5in ;
proc sgplot data=Heart aspect=1 noborder noautolegend;          * Generate valentine (polygon+scatter+series plots);
title c=cxDC362D height=20pt "Happy Valentine's Day!";
symbolimage name=heart image='/folders/myfolders/WhiteValentineIcon.png'; 
polygon x=x y=y id=id / fill fillattrs=(color=cxDC362D);              * Red heart polygon plot; 
scatter x=x2 y=y2 / markerattrs=(color=white symbol=heart size=16pt); * White heart icon markers scatter plot;
series x=x y=y / lineattrs=(color=cxDC362D thickness=1pt);            * Red border series plot;
xaxis display=none min=-2.5 max=2.5 offsetmax=.001 offsetmin=.001; 
yaxis display=none min=-4 max=1 offsetmax=.001 offsetmin=.001;
run;

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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