A proposed solution. In the following, yRnd1 = random variable with a uniform probability in the, say, 1-100 range. yRnd2 = random variable with a probability distribution linearly increasing from 1 to, say, 100. yRnd2 = random variable with a probability distribution quadratically increasing from 1 to, say, 100. /******************************/ /**** sample distributions ****/ /******************************/ data t_a; do _N_ = 1 to 100000; xRnd = ranuni(3); yRd1 = ceil(100*xRnd); yRd2 = ceil(100*(xRnd**(1/2))); yRd3 = ceil(100*(xRnd**(1/3))); output; end; run; /********************************************************/ /*** wanting to set 3 graphs with the same maximum wt ***/ /********************************************************/ proc sql; create table t_1 as select a.yRd1, round((a.cnts/b.zMax),0.001) as wt from (select yRd1, sum(1) as cnts from t_a group by yRd1) a, (select max(cnts) as zMax from (select yRd1, sum(1) as cnts from t_a group by yRd1)) b order by a.yRd1; create table t_2 as select a.yRd2, round((a.cnts/b.zMax),0.001) as wt from (select yRd2, sum(1) as cnts from t_a group by yRd2) a, (select max(cnts) as zMax from (select yRd2, sum(1) as cnts from t_a group by yRd2)) b order by a.yRd2; create table t_3 as select a.yRd3, round((a.cnts/b.zMax),0.001) as wt from (select yRd3, sum(1) as cnts from t_a group by yRd3) a, (select max(cnts) as zMax from (select yRd3, sum(1) as cnts from t_a group by yRd3)) b order by a.yRd3; quit; /******************************/ /*** plotting for, say, t_2 ***/ /******************************/ proc sgplot data=t_2; scatter x=yRd2 y=wt; run;
... View more