BookmarkSubscribeRSS Feed
jlevin
Calcite | Level 5

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.

Screen Shot 2017-09-08 at 10.52.57 PM.png

 

 

 

2 REPLIES 2
WarrenKuhfeld
Rhodochrosite | Level 12

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;
 
jlevin
Calcite | Level 5

Thank you so much, that worked.  Much appreciated.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1269 views
  • 2 likes
  • 2 in conversation