| The GBARLINE Procedure |
| Procedure Features: |
| |||||||||||||||||||||||||
| Other Features: |
| |||||||||||||||||||||||||
| Data set: | SASHELP.ELECTRIC |
![[bar line chart showing weighted statistics]](images/gblpower.gif)
This graph shows the total amount of power generated by six different energy sources in the US during the years 1994 to 2005. It also shows the revenue received from four different customer sectors during these same years.
The power generated is graphed as a subgrouped bar chart. The chart variable is YEAR, and the subgroup variable is CUSTOMER, the customer sector. The program also specifies the DISCRETE option, so each year's data is graphed as a separate midpoint. The subgroups create a separate segment in the bar for each year, and the height of each bar represents the total revenue for that year for all customer sectors.
The power generated from each energy source is plotted as six different line plots. Each of the six plot lines represents a different energy source.
Separate legends are created for the bar chart and the line plots. By specifying the LEGEND POSITION= option, the legend for the bar chart is displayed at the top middle of the graph. The legend for the plots is displayed at the bottom right of the graph.
The colors used for everything except the plot lines is controlled by the style. The example specifies the Analysis style.
This example defines data tip text for both the plot symbols and the bar chart segments. It defines drill-down URLs for the entries in the footnotes.
| |
goptions reset=all border; |
| |
ods listing close; ods html style=analysis gtitle nogfootnote; |
| |
axis1 label=(j=c "Revenue" j=c "(billions)") minor=none; /* left */ axis2 label=(j=c "Power" j=c "Generated" j=c "(GWh)") minor=none; /* right */ axis3 label=none; /* bottom */ |
| |
symbol1 c=black value=circle; symbol2 value=dot; |
| |
ods HTML close; ods listing; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.