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 !
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.
Ready to level-up your skills? Choose your own adventure.