How to save boxplot to as to a variable?

筅森魡賤 提交于 2019-12-22 06:56:12

问题


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")

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.

Does anyone have any idea?


回答1:


The following does it. Call after that recordedPlot

boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
recordedPlot = recordPlot()
dev.off()


来源:https://stackoverflow.com/questions/27064296/how-to-save-boxplot-to-as-to-a-variable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!