BookmarkSubscribeRSS Feed
mape
Calcite | Level 5

Dear community,

I have produced a scatter plot using proc template and proc sgrender, with x-axis in log scale using:

layout overlay/ xaxisopts=( type=LOG  LOGOPTS=(base=10 minorgrid=false minorticks=true  viewmin=1 viewmax=10))

The feedback I got was that I must show also the observations with negative samples. So the x-axis should look like this:

mape_0-1684909950799.png

How can I achieve this??

Many thanks for your support

 

1 REPLY 1
ballardw
Super User

Since the LOG function is basically not defined for negative numbers I haven't a clue what your advisor or commentators are actually suggesting.

 

From the documentation associated with Layout Overlay and Log Axes:

The numeric data that is used for a log axis must be positive. If zero or negative values are encountered, a linear axis is substituted and the following note is written to the log:
NOTE: Log axis cannot support zero or negative values in the data range. The axis type will
      be changed to LINEAR.

If you must display negative X axis values then you aren't going to do it with Type=LOG axis. I would go back to the source of the feedback and see what they say about negative values and a LOG axis.

 

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 754 views
  • 1 like
  • 2 in conversation