Date: Thu, 11 Jan 2007 15:40:21 -0500
Reply-To: "data _null_;" <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_;" <datanull@GMAIL.COM>
Subject: Negative ZERO
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
From time to time very small negative numbers printed with Fw.d format
print as negative zero as in the GPLOT(run on windows) below.
Just wondering how others have handled the situation. Round will fix
it but when an ORDER list in GPLOT is specified as (-4 to 2.4 by 0.8)
for example, I cannot see a way to fix it other than by specifying
something like (-4,-3.2,-2.4,-1.6,-0.8,0,0.8,1.6,2.4) instead.
I think it is interesting that GPLOT prints negative zero but PLOT does not.
data work.test;
do y = -4 to 2.4 by 0.8;
x = y;
output;
end;
format y x f6.1;
run;
proc print;
format _all_;
run;
proc gplot;
plot y*x / vaxis=-4 to 2.4 by 0.8 haxis=-4 to 2.4 by 0.8;
run;
quit;
proc gplot;
plot y*x / vaxis=-4,-3.2,-2.4,-1.6,-0.8,0,0.8,1.6,2.4 haxis=-4 to 2.4 by 0.8;
run;
quit;
proc plot;
plot y*x / vaxis=-4 to 2.4 by 0.8 haxis=-4 to 2.4 by 0.8;
run;
quit;
My current work around is to use the ORDER list in a DO and write a
comma delimited list.
|