之前有類似的問題(how to prevent midpoints from extending),但不回答我的問題。SAS:防止擴展端點
我創建一個柱狀圖如下所示,輸出到PNG文件:
ods graphics on/imagename = "histoOne" imagefmt = png reset=index border=off width=4in;
ods select where=(_name_ ? 'Histogr');
proc univariate data=myData noprint; *(WHERE=(sumStake < 250));
Title1;
var sumStake;
histogram sumStake/name='histogr' vminor=4 grid lgrid=34 endpoints=0 to 250 by 20 cfill=red;
*Omit the inset, because the stats refer to the reduced dataset;
INSET n (comma11.0) mean (5.2) median (5.2) std='Std Dev'(5.2) max='Max' (5.2)/pos = ne
header = 'Summary Statistics' cfill = ywh;
run;
ods graphics off;
我想同時顯示直方圖和彙總統計插圖。但是,數據如此偏斜,因此在X軸上顯示sumStake的最大值是沒有意義的。我想將X軸上限設置爲250.
SAS不斷擴展ENDPOINTS值。我怎樣才能抑制這一點?
我不想使用(WHERE=(sumStake < 250));
過濾器,因爲插圖中的計數,平均值,中位數和最大值將基於縮減的樣本,而不是整個樣本,因此無意義。