0

我已经运行 fitdist 并将结果存储在:

params = fitdist( data, dist,method="mle" )
results[[i]]<-params

我的问题是当我使用:

plot(results[[1]])

我得到了几个图形,包括一个 qqplot。我想改变qqplot线条的颜色。我怎样才能做到这一点?

谢谢

4

1 回答 1

1

如果您使用包中包含的函数denscomp、和逐步创建此图,qqcomp则可以影响颜色:cdfcompppcompfitdistrplus

# sample dataset:
data <- rnorm(1000, 0, 1)

# calculate fitting:
fitting <- fitdist(data, "norm")

# the original plot:
par(mfrow=c(1,1))
plot(fitting)

# create it graph by graph with different colors:
par(mfrow=c(2,2))
denscomp(fitting, datacol="gray", fitcol="blue")
qqcomp(fitting, fitpch = 20, fitcol="gray", line01col ="blue")
cdfcomp(fitting, datacol="gray", fitcol="blue")
ppcomp(fitting, fitpch = 20, fitcol="gray", line01col = "blue")
于 2015-06-10T17:48:21.473 回答