In [1]:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
df = pd.DataFrame(np.random.rand(200, 1), columns=list('B'))
df['Levels']= np.random.randint(0,5,200)
df['Method']= np.random.randint(0,4,200) #different methods to compare as seperate plots
D= np.random.randint(0,2,200) #comparison vector
my_dict = {0:'With', 1:'Without'}
df['Discriminator']= [my_dict[zi] for zi in D] #comparison vector

#https://python-graph-gallery.com/100-calling-a-color-with-seaborn/


sns.set(font_scale=3,style="ticks", palette="pastel", color_codes=True)

g=sns.factorplot(x="Levels", y="B", 
               hue="Discriminator", data=df, #col_wrap=2, #comment "col_wrap" for single column
               row="Method",kind="violin", #single column change to "row"
                inner="quartile", cut=0.2, #col_wrap=1, 
                 split=True,size=10,
                 aspect=1.25, bw=.5,
                 scale="area", #area, count, width
                 palette={"With": "r", "Without": "b"},
                 legend_out = False,saturation=1,
                hue_order=["Without","With"]).despine(left=True)

plt.show()