i have a data set arranged with the following columns:
Month Day Hour EndUse LoadElec LoadGas
I think the columns Month/Day/Hour are pretty self-explanatory. The column "EndUse" has 13 categories (Lighting,Cooking,Hotwater,AC,Heating,....). I would like to create a chart showing how the various end-uses contribute to daily load for each month-day. I haven't been able to find an option that allows me although the cloest I got was a series plot with the column "EndUse" as a parameter to the Group= option.
You might want to use PROC SORT to sort by EndUse and then use PROC MEANS to summarize the data for each Month+Day pair.
You can then use PROC SGPLOT to construct a line plot or PROC SGPANEL to construct a panel of line plots. See if the last two examples at http://blogs.sas.com/content/iml/2010/12/03/how-does-participation-in-social-media-vary-with-age/ are similar to what you want. If so, you can use the link in the first paragraph to download the program that created the plots.
If you want to draw this as an area plot using the SG procedures, you can use the BAND plot to do it. Set the LOWER = 0 and the UPPER=<your varialble>. You can also set transparency on the plot so that you can see obscured areas.
Hope this helps!
Rather than area (or band) plots, I tend to prefer stacked bar charts for this kind of thing. You can make the space between the bars zero, so that there's no gap between the bars, which gives it the same visual effect of the area plot, but since you have discrete bar segments, you can easily add mouse-over text (and do things like placing labels on each of the bar segments, etc). Bar charts also let you do easy "grouping", which might come in handy with you (day/hour) data.
Here is an example:
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.
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.