Hi All - I am trying to plot year-quarter values on the x axis using sgplot and have around 50 labels. When I use SGPlot, it only shows every alternative year quarter instead of all the 50 labels. Is there any way, I can show all possible value on the x-axis? I did explore 'values' options, but it might not a good option as the year-quarter information will vary based on my data.
Any thoughts / guidance will be appreciate.
What do you get when you specify INTERVAL=QUARTER on your XAXIS statement?
Please show the entire code you are using.
Also it may help to tell us the format currently assigned to the x-axis variable.
Are you getting any notes in the log about fitting values to your axis space?
For date axes, PROC SGPLOT will perform special processing to handle the fact that months are different lengths. The NOTE is telling you that the special processing is occurring. For example, see the results of each of these calls:
proc sgplot data=sashelp.stocks;
series x=date y=open / group=stock;
run;
proc sgplot data=sashelp.stocks;
where date < '01jan1990'd;
series x=date y=open / group=stock;
run;
Smaller font? Larger plot? Rotate the axis labels?
I have not tried reducing the font size. I will give it a try and see if it works.
Try the following
xaxis values=(a to b by 1);
a means the start value
b means the end value
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.
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.