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;
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.
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.
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.
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.