Hi,
I'd like the count of the landslide types to be log transformed on the y axis. I am still new to SAS, but to my understanding this should work:
proc sgplot data=landslide3;
vbar landslide_type;
yaxis type=log logbase=10 logstyle=logexpand;
run;
However this is the graph I am getting. The axis stil seems to just be counting the frequency with no log transformation. If anyone could help steer me in the right direction with the code to plot frequency with a log transformation that would be awesome.
Allways look at the log.
NOTE: The log axis cannot support zero or negative values for the axis from plot data or due
to default or assigned BASELINEINTERCEPT value. The axis type will be changed to LINEAR.
Here is a possible work around.
proc sgplot data=sashelp.gas;
vbar fuel / baseline=1e-8;
yaxis type=log logbase=10 logstyle=logexpand;
run;
Thank you so much, that worked. Much appreciated.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.