我正在使用sgplot创建一个直方图。
有人知道如何用对数刻度显示x轴吗?
我试着遵循下面的文档,但它似乎不起作用。我得到以下警告:
NOTE: Log axis cannot support zero or negative values in the data range.
The axis type will be changed to LINEAR.data Have;
call streaminit(12345);
do i = 1 to 10000;
t = abs(rand("normal", 0, 5));
x = exp(t);
y = rand("Normal");
if abs(x)>1 then output;
end;
run;
proc sgplot data=have;
histogram x;
xaxis type=log logbase=10 logstyle=logexpand
logvtype=exponent
min=1 max=8;
run;发布于 2019-10-14 11:28:55
相反,考虑做一个对数转换的直方图:
data plot;
set have;
log10x = log10(x);
run;
proc sgplot data=plot;
histogram log10x;
* xaxis type=log logbase=10 logstyle=logexpand
logvtype=exponent
min=1 max=8
;
run;

https://stackoverflow.com/questions/58364428
复制相似问题