title: How can I make a perfectly square plot with a colorbar in MATLAB?
body: <p>I am trying to create a contour plot (with colorbar) which has the contour plot perfectly square, for aesthetic/data interpretation reasons.</p>
  
  <p>Example code:</p>
  
  <pre><code>x=-10:10;
  y=-10:10;
  [X Y] = meshgrid(x,y);
  f = figure('Visible','off');
  contour(X,Y,X.*Y,'Fill','on');
  colorbar
  x_size = 10;
  y_size = 10;
  set(f, 'PaperUnits', 'inches','PaperPosition',[0 0 x_size y_size]);
  print(f, '-depsc2','notsquare.eps);
  </code></pre>
  
  <p>Is there a way to control the dimensions of just the contour plot region such that it will be perfectly square?</p>