What@Vince_SAS said: Lots of amazing people in here! @grandpastyle13: At your convenience, you can post one comment that encapsulates the tips you used and tag the contributors. When you mark that one as the accepted solution, everyone tagged accrues credit.
Can't wait till you pop the question!
/* rose picture*/
ods graphics/reset=all;
ods graphics/ imagefmt=png;
options device=png;
options nodate nonumber;
*ods graphics/ height=6.5in noborder;
ods pdf gtitle gfootnote
file="n:\rose_card.pdf"
startpage=no ;
title;
ODS USEGOPT ;
%macro makecard(for=@grandpastyle13,from=SAS Community Managers);
data Roses;
/* the array below has a list of multipliers that make
pretty roses, it is temporary, so will not be saved
with the data*/
array klist{11} _temporary_ (4, 5, 6, 1.5, 2.5, 1.333333, 2.33333, .75, 1.25, 1.2, .8333333);
do flower=1 to 12;
n = ceil( 11*rand("Uniform") );
/*pick a random number
between 1 and 11*/
k=klist{n}; /*assign k to be the nth multiplier*/
/* draw the rose r=cos(k * theta) */
do theta = 0 to 12*constant("pi") by 0.1;
r = cos(k * theta); /* generalized rose */
x = r*cos(theta); /* convert to Euclidean coords */
y = r*sin(theta);
/*move the rose to the right spot*/
if flower <= 5 then
do;
cx=2*flower+1;
cy=9;
end;
else if 6<= flower<=9 then
do;
cx=(2*flower-8);
cy=10.5;
end;
else if 10<= flower<=12 then
do;
cx=(2*flower-15);
cy=12;
end;
x=x+cx;
y=y+cy;
group=flower;
output;
/*make the stem*/
group=-flower;
x=cx;
y=cy;
output;
x=7;
y=3;
output;
end;
end;
/*bow*/
do theta = constant("pi")*7.5/12 to constant("pi")*28.5/12 by 0.01;
r = cos(2 * (theta)); /* rose */
x = r*cos(theta); /* convert to Euclidean coords */
y = r*sin(theta);
group=100;
if y<abs(x) then
do;
x=x+7;
y=y+3;
output;
end;
end;
run;
proc sort data=roses;
by group;
title1 "Good luck, @grandpastyle13!" ;
title2 "(These random polar roses will keep till you propose. ;-)" ;
proc sgplot data=Roses aspect=1 noautolegend
noborder nowall;
styleattrs datacontrastcolors=
(
green green green green
green green green green
green green green green
red bippk red purple bippk
blue purple bippk red purple blue red
crimson
) datalinepatterns=(1);
series x=x y=y /group=group;
xaxis min=0 max=15 display=none;
yaxis min=0 max=15 display=none;
footnote "Best wishes, &from";
footnote2 " ";
footnote3 " ";
footnote4 " ";
footnote5 " Polar Roses: r = cos(k*theta)";
footnote6 " Generated with the SAS System 9.4";
run;
title;
footnote;
%mend;
%makecard(for=@grandpastyle13,from=Your SAS Community Managers);
ods pdf close;
... View more