seaborn violin plot, how can I set labels?
Question: I'm plotting a list of vectors as a sequence of violin plots. I'd use a pandas
dataframe, but the lists are unequal lengths.

This works: `python g = sns.violinplot (data=res, cut=0, inner='box') `

where 'res' is a list of lists (each a vector of floats), where each vector
should be turned into a violin. It is.

but the x axis is just labeled '0,1,2...'. Adding the parameter
'names=[0,1,2...]' is silently ignored.


Answer: You can use the `.set_xticklabels()` method:

    
    
    g = sns.violinplot (data=res, cut=0, inner='box')
    g.set_xticklabels(['a','b','c'...])
    

Example:

    
    
    import numpy as np, seaborn as sns
    
    res = [i for i in (np.random.randn(3, 25))]
    ax = sns.violinplot(data=res, cut=0, inner='box')
    ax.set_xticklabels(['a','b','c'])
    

Results in:

[![enter image description
here](http://i.stack.imgur.com/kB9ue.png)](http://i.stack.imgur.com/kB9ue.png)

