BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
adqs
Calcite | Level 5

Dear community,

I was wondering if someone could give me a hint regarding how to avoid scientifc notation on the y-axis in semi-log plots (Y log | X linear)? The Y axis has a range from 10 000 - 1 000 000 wherase the data ranges from 20.000-500.000. SAS turns the range on the y axis into 1E5 - 1E6 which I would like to avoid. I am using GTL/sgrender and this is my standard logopts statement:

logopts=(base=10 tickintervalstyle=LOGEXPAND minorticks=TRUE THRESHOLDMAX=0.35 THRESHOLDMIN=0.35))

I have tried the following:

- in logopts: viewmax=/viewmin= | logopts seems to ignore that)

- applying a format (TICKVALUEFORMAT=yleft_fmtname) which does not work in logopts

Any ideas what to try more?

Thanks for your help!

Andreas

I got SAS 9.3


1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

Why not just add a format statement?

proc sgrender data=testdata template=testapp;

  format y comma10.0;

run;

View solution in original post

8 REPLIES 8
djrisks
Barite | Level 11

Hello Andreas,

The code you have shown, seems like it should work, i.e. because you are using base = 10 and tickintervalstyle = LOGEXPAND.

Can you provide your full program and the dataset so I can have a more detailed look. There may be another reason why it's not working as you expect.

Thanks.

adqs
Calcite | Level 5

Dear djrisks,

When I am exectuing the attached sampleprogram, I have the following options:

1.) comment viewmax out -> y-axis ranges from 1E4-1E6 where I would rather like to have 10,000 - 1,000,000

2.) comment thresholdmin and thresholdmax out and use viewmax -> y-axis marks range form  10,000 - 100,000 where I would rather like to have either the above or 10,000 - 500,000

Thanks for your help.

ChrisNZ
Tourmaline | Level 20

Why not just add a format statement?

proc sgrender data=testdata template=testapp;

  format y comma10.0;

run;

adqs
Calcite | Level 5

Thanks Chris,

Was too focued on getting it done with "tickvalueformat=".

ChrisNZ
Tourmaline | Level 20

No worries. It'd be interesting to know why  tickvalueformat  didn't work though.

adqs
Calcite | Level 5

I think it does not exist for logopts but only for linearopts.

ChrisNZ
Tourmaline | Level 20

There are still too many inconsistencies.    😞

djrisks
Barite | Level 11

Hi Andreas,

Thank you for supplying the code. I agree with Chris's answer. Using the format statement along with your template and dataset produces your desired result.

Thanks.

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!

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.

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
  • 8 replies
  • 3293 views
  • 0 likes
  • 3 in conversation