将两个并排绘制在底部的不同绘图导致绘制两次相同的绘图

时间:2015-12-30 16:20:04

标签: r plot

我在基础两个直方图中绘图:

#grid
par(mfrow=c(1,2))
#plot1
with(new_train, plot(hist(Elevation)))
#plot2
with(new_test, plot(hist(Elevation)))

siede by side plots

数据不同!任何提示?

由于

1 个答案:

答案 0 :(得分:3)

问题是你正在调用“情节”。

#grid
par(mfrow=c(1,2))
#plot1
with(new_train, hist(Elevation))
#plot2
with(new_test, hist(Elevation))