title: How to add legend on Seaborn facetgrid bar plot
body: <p>I have the following code:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  import matplotlib
  matplotlib.use('Agg')
  import matplotlib.pyplot as plt
  matplotlib.style.use('ggplot')
  import seaborn as sns
  
  sns.set(style="white")
  
  # Create a dataset with many short random walks
  rs = np.random.RandomState(4)
  pos = rs.randint(-1, 2, (10, 5)).cumsum(axis=1)
  pos -= pos[:, 0, np.newaxis]
  step = np.tile(range(5), 10)
  walk = np.repeat(range(10), 5)
  df = pd.DataFrame(np.c_[pos.flat, step, walk],
                    columns=["position", "step", "walk"])
  
  
  
  # Initialize a grid of plots with an Axes for each walk
  grid = sns.FacetGrid(df, col="walk", hue="walk", col_wrap=5, size=5,
          aspect=1)
  
  
  # Draw a bar plot to show the trajectory of each random walk
  grid.map(sns.barplot, "step", "position", palette="Set3").add_legend();
  
  grid.savefig("/Users/mymacmini/Desktop/test_fig.png")
  #sns.plt.show()
  </code></pre>
  
  <p>Which makes this plot:</p>
  
  <p><a href="https://i.stack.imgur.com/y6Cpc.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/y6Cpc.jpg" alt="enter image description here"></a></p>
  
  <p>As you can see I get the legend wrong. How can I make it right?</p>