Using SGPLOT, is there a way to change to rotation angle to a specified angle? It appears that the default is 45 degrees. I'm using a VBARPARM and a SERIES line on the chart. I've looked into the documentation and maybe I'm just not seeing something. I should think that should be easy?
Thanks!
XAXIS statement in SGPLOT provides rotation values of 0 degrees (horixontal), 90 degreees (vertical), and +/-45 degrees (diagonal or 'diagonal2').
The annotation facility allows arbitrary rotation of text, but might be more effort than you want to deal with.
Try playing with FITPOLICY= option and labelattrs=(size=n)
Thanks for your response.
The reason I'm wanting this is because my xaxis labels are quite long, and when they are angled 45 degrees, it makes the whole graph look like it's shifted to the left. Yes, I could mess with the fitpolicy and the fonts size with LABELATTRS but that still doesn't accomplish what I'm looking for. I thought there'd be a way to change the angle, but I guess not.
Appreciate it!
Thanks
I assume you mean the x-axis tick values. If your tick values are very long, it is often better to use a HBAR, or place the category variable on the y-axis, and response on the x-axis. Please see last graph in this article.
Hi, thanks. That's certainly an idea. (And yes, I did mean x tick mark values :)) My only drawback to that is that this a combination of a bar chart and a series plot. Maybe I can work something out on that.
Thanks for the idea!
If you attach an image of your graph, better suggestions could be made. These often depend on the number of categories, and other details. Providing a working program with sample data is even better.
Hi,
Unfortunately it has company sensitive data in it and changing this data for the graph would take longer than it may be worth. I'll just go with it for now. There have been some good suggestions.
Thanks 🙂
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.