data test; /* Sam Gordji 9/24/07 */ ; do x=-1 to 1 by .01; /* do x=0 to 1 by .01; /* do x = 1 to 100 ; */ /* y6= (1./x)*exp(-x**2) ; */ y5 = erf(4.*x) ; y4= erf(2.*x) ; y3=erf(-x) ; y2 = erf(x/2.) ; y1 = erf(x/4.) ; y = erf(x/8.); output; end; run; ods listing close; /* This code uses an ODS PS statement to create */ /* the PostScript file called gordji2.ps in the */ /* existing directory d:\sasweb. */ ods ps body = 'c:\edrive\jan003\graph.ps'; /* ods ps body = 'd:\sasweb\gordji2.ps'; */ goptions reset = goptions device = SASPRTC target = SASPRTC ftext = 'helvetica' htext = 1 ; title2 h=1.5 f='helvetica/bo' 'Plot of erf(2X), erf(x) ... to erf(x/8)'; footnote h=1.0 f='helvetica/bo' 'Spline Interpolation '; axis1 order=(-1 to 1 by .25) ; proc gplot data=test; plot (y y1 y2 y3 y4 y5 )*x / overlay ; /* plot (y y1 y2 y3 y4 y5)*x / HAXIS=AXIS1 / overlay ; /* plot y1 * x ; * / /* plot (y y1 )*x / overlay ; */ /* haxis=axis1 vaxis=axis2 legend; */ symbol1 i=spline c=black; run; quit; ods ps close; ods listing;