BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dave25
Quartz | Level 8

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;

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

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;

View solution in original post

2 REPLIES 2
DanH_sas
SAS Super FREQ

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;

Dave25
Quartz | Level 8
as I thought - something pretty fundamental! -thanks!

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1316 views
  • 0 likes
  • 2 in conversation