Reputation: 3
I'm trying to draw a variable with 3 reference lines calculated with user-selected parameters.
proc gplot data=DES;
plot yn*n /vref= u-&r &r u+&r;
run;
r is choosen by the user
u is calculated
how can I assign the value directly to vref?
Upvotes: 0
Views: 47
Reputation: 51601
You need to give the VREF=
option a list of values. So U
needs to be stored into a macro variable. Then you can use %EVAL()
, for integers, or %SYSEVALF()
, for real values, to calculate the values to pass as the reference lines.
So your GPLOT code will look like:
proc gplot data=DES;
plot yn*n /vref=( %sysevalf(&u-&r) &r %sysevalf(&u+&r) );
run;
Upvotes: 2