[英]Plotting large values in SGPLOT
我正在sgplot中繪制一些數據,其中y軸值非常大,從178,254,700到900,000,000。 SAS生成一個將值標記為2E8-8E8的圖。 我試圖使用value語句給出一個范圍,但這不能解決問題。 我想顯示真實值。 我該怎么做呢?
您需要調整格式。 默認格式可能是BEST8。在這種情況下,它將自動為您提供科學計數法。
如果您在談論數據標簽,通常會在數據集本身中進行更改。 我還將展示如何更改軸標簽的格式(盡管在這種情況下這很有趣)。
data largenumbers;
call streaminit(7);
do x = 1 to 10;
y = 1e10*rand('uniform');
output;
end;
format y 12.0; *use 12 digits total, which leaves plenty of room, and no decimal;
run;
ods preferences;
proc sgplot data=largenumbers;
series x=x y=y/ datalabel;
yaxis valuesformat=best12.0; *Here is a bug - you cannot use w.d format here. Annoying.;
run;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.