08-31-2017 11:54 AM
SAS can draw different kinds of graphics,I need your suggestion for what kind of SAS graph is the best for my project.
In my project, I need to compare two groups of data for 12 months,new_plan and old_plan
, the data values are production. new_plan has better value than old .I want to know how good in graphics by monthly.
Would you please give me advice on what kind of graph can best discript this comparasion?(value of new group is better in percentage than old.)
data compare; input month new_plan old_plan; cards; 1 131 115 2 130 114 3 129 113 4 128 112 5 126 110 6 125 109 7 124 108 8 122 107 9 121 106 10 120 104 11 118 103 12 117 102 ; run;
08-31-2017 01:39 PM
The data would likely work "best" as
Month Plan Value
1 New 131
1 Old 114
Proc sgplot data=modifiedcompare;
series x=month y=value / group=plan;
A Group variable allows the procedure to produce multiple lines with different colors and possibly line type depending on your current ods style and legend that will indicate, for example, the blue line represent New and the red line is Old plan data.
09-05-2017 12:38 PM
You can overlay two bar charts, one for New, one for Old. You can keep them coincident (reduce bar width for one of them), or put them side by side using DiscreteOffset. If you change data structure to "Grouped" like suggested by BallardW, you can use GROUP role. If the slope of change is important, it is better to use a series plot.
09-05-2017 01:09 PM
Other than two lines, is there a better visual effect graph that can compare them in percentage?
What does that mean?
Other plot suggestions are:
1. Plot the difference rather than the values
2. Plot it as a band, with the area between coloured to highlight the differences
3. Plot bars instead of line
All of these can be accomplished with SGPLOT.