%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import statsmodels.api as sm
import pandas
import seaborn
seaborn.set(style='whitegrid', gridweight='light')
data = np.random.lognormal(mean=-1, sigma=2, size=(370, 4))
df = pandas.DataFrame(data, columns=list('ABCD'))
df.min()
A 0.001114 B 0.001043 C 0.000318 D 0.000168 dtype: float64
fig, ax = plt.subplots()
seaborn.boxplot(df, ax=ax, notch=True)
ax.set_yscale('log')
fig, ax = plt.subplots()
seaborn.violinplot(df, ax=ax)
ax.set_yscale('log')
fig, ax = plt.subplots()
seaborn.violinplot(np.log10(df), ax=ax)
<matplotlib.axes.AxesSubplot at 0xc673a58>
seaborn.kdeplot(df.B, shade=True, vertical=True)
<matplotlib.axes.AxesSubplot at 0xf381e48>
ax = seaborn.kdeplot(np.log10(df.B), shade=True, vertical=True)
ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda x, pos: 10**x))
fig, ax = plt.subplots()
seaborn.violinplot(np.log10(df), ax=ax)
ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda x, pos: 10**x))