08-16-2011 11:16 AM
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.
08-16-2011 11:25 AM
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.
08-16-2011 11:44 AM
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!
08-25-2011 12:03 PM
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: