I have run SGPLOT with “Series” and “Scatter” but can’t seem to get the y-axis values to be explicit value (i.e., 50 to 100 by 10). Tried multiple different options including “yaxis type=linear values=(50 to 100 by 10);” and “yaxis min=50 max=100;” and neither worked (see SAS code and log below) I have also provided the output. How can I explicitly set the y-axis values in this scenario? data forplot; trt_num = 10; xval=1; aval_mean = 65; aval_lclm = 61; aval_uclm = 69; output; xval=10; aval_mean = 65; aval_lclm = 61; aval_uclm = 69; output; xval=15; aval_mean = 65; aval_lclm = 61; aval_uclm = 69; output; xval=22; aval_mean = 65; aval_lclm = 61; aval_uclm = 69; output; trt_num = 20; xval=1; aval_mean = 75; aval_lclm = 71; aval_uclm = 79; output; xval=10; aval_mean = 75; aval_lclm = 71; aval_uclm = 79; output; xval=15; aval_mean = 75; aval_lclm = 71; aval_uclm = 79; output; xval=22; aval_mean = 75; aval_lclm = 71; aval_uclm = 79; output; run; title "Attempt #1"; proc sgplot data=forplot; scatter x=xval y=aval_mean / yerrorlower=aval_lclm yerrorupper=aval_uclm group=trt_num markerattrs=(symbol=SquareFilled size=15px); series x=xval y=aval_mean / group=trt_num legendlabel="Means"; styleattrs datacontrastcolors = (red blue green purple) ; yaxis values=(50 to 100 by 10); yaxis label= 'Y-axis'; xaxis type=linear values=(0 to 25 by 5) offsetmin=0.1 offsetmax=0.1; xaxis label= "X-axis"; run; quit; title "Attempt #2"; proc sgplot data=forplot; scatter x=xval y=aval_mean / yerrorlower=aval_lclm yerrorupper=aval_uclm group=trt_num markerattrs=(symbol=SquareFilled size=15px); series x=xval y=aval_mean / group=trt_num legendlabel="Means"; styleattrs datacontrastcolors = (red blue green purple) ; yaxis min=50 max=100; yaxis label= 'Y-axis'; xaxis type=linear values=(0 to 25 by 5) offsetmin=0.1 offsetmax=0.1; xaxis label= "X-axis"; run; quit;
... View more