Manuel
Manuel

Reputation: 474

Plotting two side by side different plots in base leads to the same plot being drawn twice

I'm plotting in base two histograms:

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

siede by side plots

data is different! Any hints?

Thanks

Upvotes: 1

Views: 1709

Answers (1)

Ryan Castner
Ryan Castner

Reputation: 1054

The problem is you are making a call to "plot".

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

Upvotes: 3

Related Questions