coefficient plot in python
Question: I am trying to find a nice way to plot the linear model coefficient in python
and I got the following:

    
    
    import statsmodels.formula.api as sm
    import seaborn as sns
    import matplotlib as mpl
    import matplotlib.pyplot as plt
    
    f = 'change ~ close_r + close_f + close_f1 + close_f2 + gender + age + country_of_citizenship + country_of_origin + religion +ethnicity'
    reg_results = sm.ols(f, data=data).fit().summary()
    
    sns.set(style="ticks") 
    mpl.rc("figure", figsize=(10, 15))
    
    sns.coefplot(f,data,intercept=False);
    

which produces the following ugly plot (you can't see the x axis labels).

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

How can I rotate the plot to make it vertical (i.e., the swap the y and x axis
in order to see the labels)? and how can I add custom tick names for the
coefficients (other than the default names from the dataframe)?

I am open to alternative solutions/type of plots as well.


Answer: A solution M Waskow himself gave me when I raised the issue:

` ax = plt.gca() plt.setp(ax.get_xticklabels(), rotation=90) `

See <https://github.com/mwaskom/seaborn/issues/576>

Xaxis tick labels can be set with `plt.gca().set_xlabel(list_of_strings)`

