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
Why not just add a format statement?
proc sgrender data=testdata template=testapp;
format y comma10.0;
run;
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.
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.
Why not just add a format statement?
proc sgrender data=testdata template=testapp;
format y comma10.0;
run;
Thanks Chris,
Was too focued on getting it done with "tickvalueformat=".
No worries. It'd be interesting to know why tickvalueformat didn't work though.
I think it does not exist for logopts but only for linearopts.
There are still too many inconsistencies. 😞
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.