title: matplotlib- 2 legends in one plot
body: <p>I have the following piece of code:</p>
  
  <pre><code>plt.subplot2grid(shape=(2,3),loc=(0,0))
  df.Survived.value_counts(normalize=True).plot(kind="bar",alpha=0.6,color= ['b','r'])
  plt.title("Bar Representation- Survived wrt Age")
  plt.xlabel("Survived")
  plt.ylabel("Percentage")
  plt.show()
  </code></pre>
  
  <p>The graph looks like this :</p>
  
  <p><a href="https://i.stack.imgur.com/naCjw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/naCjw.png" alt="enter image description here"></a></p>
  
  <p>I just wanted to add 2 legends on the upper right hand side of the bar graph, Survived and Died. Just like in this graph: <a href="http://www.academis.eu/posts/images/matplotlib_barchart.png" rel="nofollow noreferrer">Graph</a></p>
  
  <p>Also, I wanted to make the labels 0 and 1 vertically aligned.</p>