俺也改进一下,加了些色 彩,是不是变漂亮了!
改进也是学习和进步的过程。
DATA Butterfly;
DO t=-400 TO 4 BY 0.01;
a = cos(t);
b = cos(4*t);
If t>-16 then
Do;
x2 = sin(t)*(exp(a)-2*b-(sin(t/12)*sin(t/12)*sin(t/12)*sin(t/12)*sin(t/12)));
y2 = cos(t)*(exp(a)-2*b-(sin(t/12)*sin(t/12)*sin(t/12)*sin(t/12)*sin(t/12)));
End;
Else
Do;
x = sin(t)*(exp(a)-2*b-(sin(t/12)*sin(t/12)*sin(t/12)*sin(t/12)*sin(t/12)));
y = cos(t)*(exp(a)-2*b-(sin(t/12)*sin(t/12)*sin(t/12)*sin(t/12)*sin(t/12)));
End;
OUTPUT;
END;
pi=constant('pi');
do x1=0.20 to (pi/4+0.20) by 0.01;
y1=3*sin(2*(x1-0.20))+2.5;
output;
x1=-1*x1;
output;
x1=-1*x1;
end;
run;
SYMBOL1 C=Red;
SYMBOL2 C=Blue;
SYMBOL3 C=Yellow;
PROC GPLOT ;
PLOT y*x y1*x1 y2*x2/ Overlay;
RUN;