Check out example codes for "how to remove the white space between two plots in r". It will help you in understanding the concepts better.

Code Example 1

> par(mfrow=c(2,1))
> par(mar=c(0,1,1,1))
> plot(1:10)
> par(mar=c(1,1,0,1))
> plot(1:10)

Learn ReactJs, React Native from akashmittal.com