Monday, February 13, 2012

Valentine's Day


Happy Valentine's Day!

data one;
do t = 1 to 3*constant("pi") by 0.05;
x = 16*sin(t)**3;
y = 13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t);
output;
end;
run;

data two;
set one;
if _n_ = 70 then label = "Valentine's Day";
run;

ods graphics on / width=6in height= 5in;
proc sgplot data = two;
series x = x y = y /lineattrs=(color=red thickness=5)
datalabel = label datalabelattrs=(color=red
family="garamond" style=italic size=45 weight= bold);
run;

13 comments:

  1. @Rick -- "parameterized" love ^-^ I didn't know you have such a post. Let me see if I can figure out a way to fill the heart like you did .... Charlie

    ReplyDelete
  2. @Rick. Cool! The BAND statement really does the trick! Charlie

    ReplyDelete