如何将boxplot保存为变量? [英] How to save boxplot to as to a variable?
本文介绍了如何将boxplot保存为变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将箱形图另存为R中的变量?
例如,如果我这样做,
How can I save the box plot as a variable in R? For example, if I did like this,
plot <- boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
当我调用图时,我希望它显示箱形图,我不需要每次都运行用于绘制boxplot的命令。
when I call plot, I want it shows the box plot, that I don't need to run the command for plotting boxplot every time.
有人有什么想法吗?
推荐答案
。在记录的记录后调用
The following does it. Call after that recordedPlot
boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
recordedPlot = recordPlot()
dev.off()
这篇关于如何将boxplot保存为变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文