title: Controlling the display in the hexbin plot
body: <p>I used the following code to generate the attached plot. But how can I control the two distances:
  1)  the distance between the main plot on the left and legend on the right ( I marked this distance with double arrow line ). I would like to make this distance shorter.
  2) the current x-axis label is so close to the lower border line of the plot.I would like to make this x-axis label lower. Similarly, I would like to move the y-axis label to the left.</p>
  
  <pre><code>par(mar=c(10,10,1,0),mgp=c(10,1,0))
  plot(matrix.3.numeric.hexbin)
  </code></pre>
  
  <p>Here the matrix.3.numeric.hexbin is a hexbin object. It looks to me whatever I change the parameter in par, the generated plot is always the same.</p>
  
  <p><img src="https://i.stack.imgur.com/9Co9Y.png" alt="enter image description here"></p>