Solved
Contributor
Posts: 35

# sganno line

I'm obviously missing something very fundamental, but have tried a NUMBER of different things, with no luck (using 9.4)

- I'm simply trying to draw an arrow, from the bottom of the graph up to the regression line...(have a number of these, and am able to set the end point of the arrow "dynamically") --  here's some test data and the shell of the code:

data test;
input MATHSS Math;
cards;
1299 201
1273 190
1282 193
1265 187
1304 212
1259 190
1291 195
1267 187
1266 179
1274 190
;

data sganno; length function x1space y1space linecolor \$20;
function = 'ARROW';
x1space ='DATAVALUE'; y1space ='DATAPERCENT' ;
x1=200; y1=0; x2=200; y2=50; LINETHICKNESS=2; DIRECTION = "OUT";
linecolor="blue";
output;
run;

proc sgplot data = test sganno=sganno;
reg x = math y=mathss/;
run;

Accepted Solutions
Solution
‎09-26-2016 01:13 PM
SAS Super FREQ
Posts: 978

## Re: sganno line

You needed to set your X2SPACE and Y2SPACE as well:

data sganno; length function x1space y1space linecolor \$20;
function = 'ARROW';
x1space ='DATAVALUE'; y1space ='DATAPERCENT' ;
x2space ='DATAVALUE'; y2space ='DATAPERCENT' ;
x1=200; y1=0; x2=200; y2=50; LINETHICKNESS=2; DIRECTION = "OUT";

linecolor="blue";
output;
run;

All Replies
Solution
‎09-26-2016 01:13 PM
SAS Super FREQ
Posts: 978

## Re: sganno line

You needed to set your X2SPACE and Y2SPACE as well:

data sganno; length function x1space y1space linecolor \$20;
function = 'ARROW';
x1space ='DATAVALUE'; y1space ='DATAPERCENT' ;
x2space ='DATAVALUE'; y2space ='DATAPERCENT' ;
x1=200; y1=0; x2=200; y2=50; LINETHICKNESS=2; DIRECTION = "OUT";

linecolor="blue";
output;
run;

Contributor
Posts: 35

## Re: sganno line

as I thought - something pretty fundamental! -thanks!
☑ This topic is solved.