【发布时间】:2013-02-01 13:48:44
【问题描述】:
我有这个raster file 我想将 y 轴(频率)重新调整为 [0,1](通过将频率除以所有频率的总和)。
conne <- file("C:\\fined.bin","rb")
sd<- readBin(conne, numeric(), size=4, n=1440*720, signed=TRUE)
y<-t(matrix((data=sd), ncol=1440, nrow=720))
r = raster(y)
hist(r, breaks=30, main="SMD_2010",
xlab="Pearson correlation", ylab="Frequency", xlim=c(-1,1))
example:
values frequency (rescaled by dividing each frequency by the sum(85600))
-1 0 0
-0.5 100 0.001168224
0 38000 0.443925234
0.5 7500 0.087616822
0.75 40000 0.46728972
【问题讨论】:
-
也许在你的数据周围使用
density( )。 -
使用:hist(...,probability = TRUE)
-
好的,然后可能类似于: hist_temp