为以下代码添加图的长和宽设计代码{ plot(ROC, time=12*1, col = "blue", add = F, title = F) plot(ROC, time=12*2, col = "purple", add = T) plot(ROC, time=12*3, col = "black", add = T) legend("bottomright", lty = 1, cex = 1.0, col = c("blue", "purple", "black"), legend = c("1 year AUC:0.814(0.724-0.905)", "2 year AUC:0.781(0.682-0.880)", "3 year AUC:0.762(0.626-0.897)")) } plotAUCcurve(ROC, conf.int = T, col="darkcyan")
时间: 2023-06-18 10:04:49 浏览: 164
Matlab绘图_matlab绘图代码_matlab_MATLAB绘图_
5星 · 资源好评率100%
你可以使用以下代码来设置图的长和宽:
```
par(mfrow=c(1,2),fig.width=10,fig.height=5)
plotAUCcurve(ROC, conf.int = T, col="darkcyan")
plot(ROC, time=12*1, col = "blue", add = F, title = F)
plot(ROC, time=12*2, col = "purple", add = T)
plot(ROC, time=12*3, col = "black", add = T)
legend("bottomright", lty = 1, cex = 1.0,
col = c("blue", "purple", "black"),
legend = c("1 year AUC:0.814(0.724-0.905)",
"2 year AUC:0.781(0.682-0.880)",
"3 year AUC:0.762(0.626-0.897)"))
```
在这里,`par(mfrow=c(1,2),fig.width=10,fig.height=5)` 设置了图的排列方式和长宽。其中,`mfrow=c(1,2)` 表示将图分为 1 行 2 列,`fig.width=10` 和 `fig.height=5` 分别设置了图的宽度和高度,单位为英寸。你可以根据需要修改这些参数。
阅读全文