Date: Thu, 24 Jun 2004 10:07:49 -0400
Reply-To: "Pleasant, David (GE Consumer Finance)" <David.Pleasant@GE.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Pleasant, David (GE Consumer Finance)" <David.Pleasant@GE.COM>
Subject: Gplot Kill SAS Session, Why?
Content-Type: text/plain; charset="iso-8859-1"
I was curious to see Ya Huang's Arrows program, so I ran it (SEE CODE BELOW). SAS vanished off of my screen. Ok, Fluke. I tried again and stepped through the code. All went well until I ran proc gplot. Then it happened again. No error message, just crashed. I tried a simplified Proc Gplot (SEE CODE BELOW). The same happened. Anyone see this before. Is it my OS or a SAS bug or something else.
As always thanks in advance for your help.
/*Ya Huang's Arrows program/*
data T;
input LABEL $ Yi Xi;
cards;
a 2 3
b 3 6
c -4 -9
d 5 1
X -6 4
Y 5 7
Z 7 -3
;
data anno;
set t;
length function style color text position $ 8;
retain hsys xsys ysys '2' style 'swiss' position '5';
if label='a' then color='red';
else if label='b' then color='green';
else if label='c' then color='blue';
else if label='d' then color='yellow';
else if label='X' then color='pink';
else if label='Y' then color='tab';
else if label='Z' then color='purple';
function='move'; x=0; y=0; size=0.1; output;
function='draw'; x=xi; y=yi; size=0.1; output;
function='label'; x=xi; y=yi; size=1;
alpha=atan((yi-0)/(xi-0))*180/3.1415926;
if xi>0 and yi>0 then angle=alpha;
else if xi>0 and yi<0 then angle=alpha+360;
else if xi<0 and yi<0 then angle=alpha+180;
else if xi<0 and yi>0 then angle=alpha+180;
angle=angle-90;
text='^'; position='5'; output;
function='label'; x=xi; y=yi; text=label;
size=1; angle=0; position='2'; output;
run;
goptions reset=all gunit=pct;
data yy;
x=0; y=0;
proc gplot;
plot y*x / annotate=anno haxis=-10 to 10 vaxis=-10 to 10;
run;
/*Simplified gplot */
Data test;
Input M A B;
Cards;
1 2 3
4 5 6
1 8 9
1 3 4
4 6 4
4 3 5
;
Run;
Symbol1 V=dot;
Symbol2 V=Plus;
Proc GPlot Data=test;
Plot A*B=M;
Run;
g GE Consumer Finance
_______________________________________________________________________________________________________________________
David Pleasant
Programmer Analyst
> GE Consumer Finance - North America
4500 Munson Street N.W.
Canton, OH 44718
Phone: (330) 433-5816 Dial Comm 360-5816
Fax: (330) 433-5604 Dial Comm 360-5604
Pager (877) 680-8854
E-Mail: David.Pleasant@ge.com
"This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message."