rIs it possible to control the xaxis (category axis) when using VBAR in the SG procedures? I have 40 months and want to show stacked bars where each bar height is a population and the stacks are comprised of population subcategories.
The issue is that the xaxis is unreadable. None of the xaxis options for time values are effective with VBAR.
Can I get around this with GTL? It's proving to be an enormous time sink, and I don't think that having a bar chart with time as the xaxis is that unreasonable a thing to try to do...
Thanks,
Jed
Assuming I understand the problem you have with the xaxis, I would use a format (either a built in format or a custom one) to display the date variables as you need. For example:
data sale; set sashelp.prdsale; format month MONYY7.; run; proc sgplot data=sale; vbar month/response=actual group=product groupdisplay=stack; run;
If that doesn't work for you, more detail would be helpful in terms of what you want to see on the x axis.
If the problem is too many tick values, you can can specify FITPOLICY=THIN on the XAXIS statement to help with that.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.