title: par function, how to set proper values for multiple graphs?
body: <p>While par() has been very useful in defining the number of plots in a single page, I was wondering if there would be a nice and quick trick to set the proper margins for multiplot pages. For instance, </p>
  
  <pre><code>dev.off()
  par(mfrow =c(3,3),mar=c(0,0,0,0),pty="s")
  x &lt;- c(1:10)
  y &lt;- c(1:10)
  for (i in 1:9){
    plot(x,y)
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/u5avK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u5avK.png" alt="enter image description here"></a></p>
  
  <p>In this rough example, the x and y labels don't appear and the distance between plots is very close.</p>
  
  <p>In the end, it becomes a rule of thumb trying to fix with <code>mar=c()</code> that all elements of the plot are visually set in one page. So, is there any quicker way to determine the margins depending on the size of the labels, axes, and number of plots? </p>
  
  <p>Thanks!</p>