0
以下的運行問題this問題設置gbm.plot中的軸寬度;我現在直接使用plot.gbm,似乎無法刪除y軸標籤,這似乎是在plot.gbm函數代碼中設置的。無法刪除plot.gbm中的y軸標籤
png(filename="name.png",width=4*480, height=4*480, units="px", pointsize=80, bg="white", res=NA, family="", type="cairo-png")
par(mar=c(2.6,2,0.4,0.5), fig=c(0,1,0.1,1), las=1, lwd=8, bty="n", mgp=c(1.6,0.5,0))
plot.gbm(my_gbm_model,1,return.grid=FALSE, write.title=F,lwd=8, ylab=F, axes=F, ylabel=FALSE, ylabel="")
axis(1, lwd.ticks=8, lwd=8, labels=FALSE)
axis(2, lwd.ticks=8, lwd=8, labels=NA, ylab=FALSE,ylabel=FALSE)
dev.off()
結果:
y軸的標籤仍然存在,儘管我的所有atempts通過par
和plot
和axis
將其刪除。我可以嘗試鑽入功能和改變這種(以及類似的)線:
print(stripplot(X1 ~ temp | X2 * X3, data = X.new,
xlab = x$var.names[i.var[i[1]]],
ylab = paste("f(", paste(x$var.names[i.var[1:3]], collapse = ","), ")", sep = ""),
...))
...但I've been advised against such practices。任何想法,爲什麼這可能工作?簡單地說,該功能覆蓋設置?
重複性:
#core data csv: https://drive.google.com/file/d/0B6LsdZetdypkWnBJVDJ5U3l4UFU
#(I've tried to make these data reproducible before and I can't work out how to do so)
library(dismo)
samples <- read.csv("data.csv", header = TRUE, row.names=NULL)
my_gbm_model <- gbm.step(data=samples, gbm.x=1:6, gbm.y=7, family = "bernoulli",
tree.complexity = 2, learning.rate = 0.01, bag.fraction = 0.5)
歡呼一抖,遺憾的緩慢回覆。 – 2014-09-17 09:11:05