下面一个经典的CODE,在一个平面内做两个直方图,可供参考
new;
x1=rndn(100,1);
x2=5 + 2*rndn(100,1);
library pgraph;
graphset;
_pdate = 0 ;
begwind;
window(1, 2, 0); /*Create two tiled windows (1 row, 2 column)*/
setwind(1); /*graph #1, left corner*/
title("Histogram Number 1");
xlabel("Categories of X1");
hist(x1,20);
nextwind; /*graph #2, right corner*/
title("Histogram Number 2");
xlabel("Categories of X2");
hist(x2,20);
endwind; /* end window processing, and display graph */
end;