Generate the vertical bar chart that summarizes all grain production for all countries for both years. DISCRETE creates a separate bar for each unique value of YEAR. GROUP= groups the bars by country. To create a legend for midpoint values, SUBGROUP= is assigned the chart variable. GSPACE= controls the space between the groups of bars.


proc gchart data=newgrain;
format country $country.;
vbar3d year / discrete
sumvar=megtons
group=country
subgroup=year
legend=legend1
space=0
width=4
gspace=3
maxis=axis1
raxis=axis2
gaxis=axis3