Hi,
I have created the following plot . this has the axex on log-scale but displayed the linear numbers as tick values. I would like to keep the same display, but to display the axes values as 1,2,3,4,5,10,20 and remove anything in between displayed. how do I do this?
My code below:
proc sgplot data=&G_DDDATASETNAME dattrmap=myattr;
scatter y=max_alt x=bas_alt / group=trt01a attrid=trt01a;
refline &refx /axis=x;
refline &refy /axis=y;
keylegend /title="" noborder;
xaxis &xval label= 'Baseline ALT (/ULN)' type=log logbase=10 logstyle=linear max=20;
yaxis &yval label= 'Maximum On-treatment ALT (/ULN)' type=log logbase=10 logstyle=linear max=20;
run;
The x axis in the plot below has displyed the axis tick values 0.3, 2,4 6,8,10,12,16,20. I would need to remove 0.3,6,8,12,16 and include 1,2,3,4,5,10,20.
Ha! Add option VALUESHINT to the axis statements to get the full range of the data while keeping the ticks specified in the VALUES option. When you specify VALUESHINT, you can also specify MIN= and MAX= values to create extra white space around your data.
Try option VALUES=(1 2 3 4 5 10 20) in your xaxis and yaxis statements.
Ha! Add option VALUESHINT to the axis statements to get the full range of the data while keeping the ticks specified in the VALUES option. When you specify VALUESHINT, you can also specify MIN= and MAX= values to create extra white space around your data.
Thanks, It worked !
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.