title: seaborn violinplots: change violin color, axes names, legend
body: <p>I used to create all my plots using <code>matplotlib</code> until I recently discovered <code>seaborn</code>. I found particularly interesting the fact that it allows you to split violins in order to compare a given <code>hue</code> variable.</p>
  
  <p>Well, my major problem is that I don't know what do I have to modify in order to change <strong>violin colors</strong>, <strong>axes names</strong>, or <strong>place the legend</strong> where I want.</p>
  
  <p>Here is the example I followed from <code>seaborn</code>:</p>
  
  <pre><code>    import seaborn as sns
      tips = sns.load_dataset("tips")
      sns.set(style="ticks", palette="colorblind")
      g = sns.FacetGrid(tips, col="time", size=4, aspect=.75)
      g = g.map(sns.violinplot, "sex", "total_bill", "smoker", inner=None, linewidth=1, scale="area", split=True, width=0.75).despine(left=True).add_legend(title="smoker")
      g.savefig(os.path.join(options.output_dir, "figures", "violinplots.png"))
  </code></pre>
  
  <p>And here is the output figure <code>violinplots.png</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/HGSHy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HGSHy.png" alt="enter image description here"></a></p>
  
  <p>While I would rather like something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/dLUh4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dLUh4.png" alt="enter image description here"></a></p>
  
  <p>To summarize:</p>
  
  <ul>
  <li>use <code>white</code> and <code>blue</code> colors</li>
  <li>replace axes <code>names</code></li>
  <li>write <code>leftmost y axis</code> only</li>
  <li>make my own <code>legend with the blue category only</code></li>
  </ul>
  
  <p>Thank you in advance. Any help will be welcome.</p>
  
  <hr>
  
  <p>In case anyone was interested, here is how I finally resolved the figure thanks to <a href="https://stackoverflow.com/users/4299720/mrpedru22">MrPedru22</a>:</p>
  
  <pre><code>import seaborn as sns
  tips = sns.load_dataset("tips")
  sns.set(context="paper", palette="colorblind", style="ticks")
  g = sns.FacetGrid(tips, col="time", sharey=False, size=4, aspect=.5)
  g = g.map(seaborn.violinplot, "sex", "total_bill", "smoker", cut=0, inner=None, split=True, palette={"No": "#4477AA", "Yes": "white"}, saturation=1).despine(left=True)
  # Set axis labels &amp; ticks #
  g.fig.get_axes()[0].set_xlabel("Lunch")
  g.fig.get_axes()[1].set_xlabel("Dinner")
  g.fig.get_axes()[0].set_xticklabels(["Male", "Female"])
  g.fig.get_axes()[1].set_xticklabels(["Male", "Female"])
  g.fig.get_axes()[0].set_ylabel("Total bill")
  g.fig.get_axes()[0].set_yticks(range(0, 80, 10))
  g.fig.get_axes()[1].set_yticks([])
  g.fig.get_axes()[0].spines["left"].set_visible(True)
  # Set legend #
  handles, labels = g.fig.get_axes()[0].get_legend_handles_labels()
  g.fig.get_axes()[0].legend([handles[1]], ["Non-smoker"], loc='upper left')
  # Fixing titles #
  g.fig.get_axes()[0].set_title("")
  g.fig.get_axes()[1].set_title("")
  g.plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tZAbf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tZAbf.png" alt="enter image description here"></a></p>