Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A three-dimensional histogram displays tabulated crosstabulations, percents, density, and so on as solid bars. Each bar represents a nonoverlapping interval of two quantitative variables. The resulting three-dimensional representation is projected onto a plane for display. The following steps create a three-dimensional histogram of a bivariate normal density function and display the results in Figure 1.96:
data normal;
do x = -4 to 4 by 0.5;
do y = -4 to 4 by 0.5;
z = 0.164 * exp(-0.5 * ((x + y * 0.25) * x + (x * 0.25 + y) * y));
output;
end;
end;
run;
proc template;
define statgraph bihistogram1;
begingraph;
entrytitle "Bivariate Normal Density";
layout overlay3d / cube=false;
bihistogram3dparm x=x y=y z=z;
endlayout;
endgraph;
end;
run;
proc sgrender data=normal template=bihistogram1;
run;