title: set_constrained_layout doesn't work on my code
body: <p>The following is mycode 
  if use fig.set_constrained_layout(True) , legend:lga display error
  if use fig.tight_layout(), legend:lga dispaly ok
  could you please tell me the reason and how to use the set_constrained_layout</p>
  
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  import matplotlib.pyplot as plt
  
  x1 = np.arange(10)   
  x2 = x1*10 
  y1 = x1*2
  y2 = x1*100
  
  
  fig = plt.figure()
  fig.set_constrained_layout(True)
  
  ax1 = fig.add_subplot(2,2,1)
  ax2 = fig.add_subplot(2,2,1,frameon=False,sharex=ax1)
  
  ax3 = fig.add_subplot(2,2,2)
  ax4 = fig.add_subplot(2,2,2,frameon=False,sharex=ax3)
  
  lg1 = ax1.plot(x1,y1,label='ax1')
  lg2 = ax2.plot(x2,y2,label='ax2',color='tab:red')
  ax2.get_yaxis().set_ticks_position('right') 
  
  
  lg3 = ax3.plot(x1,y1,label='ax3')
  lg4 = ax4.plot(x2,y2,label='ax4',color='tab:red')
  ax4.get_yaxis().set_ticks_position('right') 
  
  ax1.tick_params(axis='x', labelcolor='tab:blue') 
  ax1.tick_params(axis='y', labelcolor='tab:red') 
  ax2.tick_params(axis='y', labelcolor='tab:red') 
  
  ax3.tick_params(axis='x', labelcolor='tab:blue') 
  ax3.tick_params(axis='y', labelcolor='tab:red') 
  ax4.tick_params(axis='y', labelcolor='tab:red') 
  
  
  loc_val = "upper right"
  
  lga = lg1 + lg2
  labs = [l.get_label() for l in lga]
  ax1.legend(lga, labs, loc=loc_val ,bbox_to_anchor=(2,1))
  
  lgb = lg3 + lg4
  labs = [l.get_label() for l in lgb]
  ax3.legend(lgb, labs, loc=loc_val )
  
  fig.set_constrained_layout(True)
  #fig.tight_layout() 
  plt.show()
  
  </code></pre>