hi all,
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.
Have you looked at the code on Robert Allison's page:
thanks! i am curious as to why proc sgplot cannot handle something like this?
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!
Dan
Here is an example of what Dan is suggesting:
https://sites.google.com/site/smatange/ods-graphics/panel-by-month-and-day
awesome!!!
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:
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 16. 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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: