Features: |
Multiple PLOT statements: SUMVAR= |
Other features: |
ODS statement option: STYLE= AXIS statements LEGEND statements ODS HTML statement SYMBOL statement |
Data set: | SASHELP.ELECTRIC |
Sample library member: | GBLPOWER |
goptions reset=all border;
ods html style=analysis gtitle nogfootnote;
title1 "US Electric Power - Revenue and Generation Sources"; footnote1 j=l italic link="http://www.eia.doe.gov/cneaf/electricity/epa/epat7p3.html" "Link to Bar Data: USEIA Energy Customer Sectors"; footnote2 j=l italic link="http://www.eia.doe.gov/cneaf/electricity/epa/epat1p1.html" "Link to Line Data: USEIA Energy Generation Sources" ;
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 */
/* Bar legend */ legend1 position=(middle right outside) across=1 label=(position=(top ) j=l "Customer Sector"); /* Line plot legend */ legend2 position=(bottom right outside) across=1 repeat=1 label=(position=(top) j=l "Generation Source") ;
symbol1 c=black value=circle; symbol2 value=dot;
proc gbarline data=sashelp.electric; bar year / discrete sumvar=Revenue subgroup=Customer raxis=axis1 maxis=axis3 legend=legend1 html=revtip name="US_Electric_Power" des="Chart of US Electricity Generation Sources and Consumers"; plot / sumvar=AllPower html=alltip legend=legend2 axis=axis2; plot / sumvar=Coal html=coaltip; plot / sumvar=Nuclear html=nuketip; plot / sumvar=NaturalGas html=gastip; plot / sumvar=Hydro html=hydrotip; plot / sumvar=Other html=othertip; run; quit;
title1 "US Electric Power - Revenue and Generation Sources"; footnote1 j=l italic link="http://www.eia.doe.gov/cneaf/electricity/epa/epat7p3.html" "Link to Bar Data: USEIA Energy Customer Sectors"; footnote2 j=l italic link="http://www.eia.doe.gov/cneaf/electricity/epa/epat1p1.html" "Link to Line Data: USEIA Energy Generation Sources" ;
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 */
/* Bar legend */ legend1 position=(middle right outside) across=1 label=(position=(top ) j=l "Customer Sector"); /* Line plot legend */ legend2 position=(bottom right outside) across=1 repeat=1 label=(position=(top) j=l "Generation Source") ;
proc gbarline data=sashelp.electric; bar year / discrete sumvar=Revenue subgroup=Customer raxis=axis1 maxis=axis3 legend=legend1 html=revtip name="US_Electric_Power" des="Chart of US Electricity Generation Sources and Consumers"; plot / sumvar=AllPower html=alltip legend=legend2 axis=axis2; plot / sumvar=Coal html=coaltip; plot / sumvar=Nuclear html=nuketip; plot / sumvar=NaturalGas html=gastip; plot / sumvar=Hydro html=hydrotip; plot / sumvar=Other html=othertip; run; quit;