0

I am plotting some data in a pandas dataframe as a simple boxplot using seaborn. I would like to use a log scale on the y axis. Is there a good way to do this?

from matplotlib import style, pyplot as plt
import seaborn as sns
import pandas as pd

plt.figure()
sns.boxplot(x='Sample', y='Variants', data=plot_data)
plt.tick_params(labelbottom=True, bottom=False)
sns.despine(offset=10, trim=True, bottom=True)

I did try plt.set_yscale('log') but I just get this error: 'module' object has no attribute 'set_yscale'

And plt.yscale('log') gives me a very large plot.

The Nightman
  • 5,609
  • 13
  • 41
  • 74

0 Answers0