BookmarkSubscribeRSS Feed
Pyrite | Level 9
I am working on an analysis by city, where I have percents/proportion of totals spent in 6 different categories at each city. I would like to present this in a way which makes these proportions stand out while also being able to compare all cities. I am picturing a stacked horizontal bar chart, with each city having a bar, but I'm afraid that would be too many bars for SAS graph. I haven't tried it yet, I'm afraid it may crash my session. So, before I do I want to know whether it's possible OR if there's another more efficient "visual" solution apart from just showing numbers.
Diamond | Level 26

I don't know if the software can handle this without crashing, but I am certain your audience will not be able to visually distinguish which bar represents which city.


Better, you should do some geographic plotting of your data like this PROC SGMAP example.

Paige Miller
Pyrite | Level 9
This was my other solution, maybe having separate maps for each category, then putting them together in a template. However, I was hoping there would at least be some visual feature in Proc Report that would do this.
Super User

By SAS Graph do you mean the old device based procedures like Gchart? The newer SGPLOT/SGPANEL have more options.


The following apply to Sgplot (or Sgpanel):

You might consider using a VECTOR plot. That would require a bit more work on your part as you would need to calculate the start/end value for each segment but I think it is less likely to have issue with the number of plot items. The real question may be how indicate the city as text has to be readable.


Or maybe a Heatmap. On dimension as the city (I think you need to have the variable as numeric and use the Bin options to make each city one bin) then have the 6 categories as the other and use a calculated value (percent? rate?) as a response to show "low" to "high" values.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1 like
  • 4 in conversation