Hi all,
I have three questions about the layout datalattice:
1) As you can see in the image attached below, I wanted to show the bar labels in the plot, but they are overlapped. So I want to rotate the percentage values to the vertical direction. How to do it?
2) How to adjust the width of a single panel automatically? For example, the width of the panel becomes thin if there is only one bar, and the width of the panel becomes wide if there are more bars.
3) Since my x-axis tick values are texts (which are not time values) and I don't want to assign them a short label, so how to split the text tick values?
I appreciate everyone's help!
Did you use SAS code to generate this plot or SAS Visual Analytics?
If you used VA, you are probably better off posting the question in the SAS Visual Analytics Forum 🙂
Hi draycut, sorry for being late to reply. I use SAS Enterprise Guide to generate this plot.
1) Are ou using BARCHART or BARCHARTPARM?
2) Try using COLUMNWEIGHT=PROPORTIONAL on the LAYOUT DATALATTICE statement.
3) Try using columnaxisopts=(discreteopts=(tickvaluefitpolicy=split))
Hi Dan, thanks for your reply. I am using BARCHART to generate this plot. Your answers to my second and third questions work well.
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 25. 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.