title: Drawing multiple graphs with subplot when y-axis takes two values
body: <p>I wanna draw 5 graphs with subplots where is each graph, y-axis should show 2 values (multiple y axes). I am using the following code, but I have some difficulties. I don't know how to add a title for each graph, how to add a general legend for all graphs, how to force that x-axis for each graph increase with step 1 and y-axis with step 0.5.</p>
  <pre><code>fig, ax1 = plt.subplots(3,2,figsize=(10,10))
  ax2 = np.array([a.twinx() for a in ax1.ravel()]).reshape(ax1.shape)
  
  x = np.arange(0,16)
  curve1 = ax1[0,0].plot(x, optimal_policy[1,:-1,0], label='Optimal p', color='r',marker='o',linestyle='--')
  curve2 = ax2[0,0].plot(x, optimal_policy[1,:-1,1], label='Optimal b', color='b',marker='v',linestyle='-.')
  ax2[0,0].set_ylabel('b') 
  ax1[0,0].set_ylabel('p') 
  ax1[0,0].set_ylim(0,4)
  ax2[0,0].set_ylim(0,4)
  
  fig.legend(loc='upper right',bbox_to_anchor=(0.5, 0.5))
  
  plt.title('Inventory =1')
  plt.xlabel('Time')
  ax1[0,0].set_xlabel('Time')
  </code></pre>
  <p><code>x</code> and <code>optimal_policy[1,:-1,0]</code> are vectors with size 16. This is just one of the graph and it is ok to replicate this graph for other subplots.</p>