title: Histogram with marginal boxplot in R
body: <p>How make matching X-axis in histogram with marginal boxplot? </p>
  
  <pre><code>data &lt;- rnorm(1000)
  nf &lt;- layout(mat = matrix(c(1,2),2,1, byrow=TRUE),  height = c(1,3))
  layout.show(nf)
  par(mar=c(5.1, 4.1, 1.1, 2.1))
  boxplot(data, horizontal=TRUE,  outline=FALSE)
  hist(data)
  </code></pre>