proc sgplot data=mydata;
series x=datey=dollar / lineattrs = (thickness=2);
xaxis display=(nolabel) valuesformat=MMYYS. interval=month valueattrs= (size=8);
yaxis display=(nolabel);
run;
Dear SAS community,
I have a dataset mydata, I want to plot date on x axis and dollar on y axis. I used the code in the above, the problem is that using that code, the number of ticks on xaxis is too small. It's too thinly displayed. the interval 2 years.
I changed my options by using "interval=month" but it doesn't change the output plot.
Anyone has any idea? Appreciate any suggestions.
A newbie in sgplot struggling... thanks!
Based on your description, my guess is that INTERVAL=MONTH would be too dense to fit. I might would try INTERVAL=YEAR and MINORINTERVAL=MONTH to get that level of detail.
Hope this helps!
Dan
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.