When we use par(mfrow), we define the number of plots we want to draw on the plot window and when we draw all the necessary plots then starts again with the first plot. For example, if we set par(mfrow) to (2,2) then we will have four plots on the plot window but if we want to create one plot on the plot window then it does not work, it will show a small plot on the upper left side. To deal with the problem, we can set par(mfrow) to (1,1).
par(mfrow=c(2,2)) x<-rnorm(100) y<-rnorm(100,0.5) z<-rnorm(100,1) a<-rnorm(100,1.5) hist(x) hist(y) hist(z) hist(a)
Creating fifth plot which we want to fit the whole plot window −
Changing par(mfrow) to make the fifth plot on the whole plot window −