Issue
I have a huge problem with my seaborn plots. For some reason, the numbers along the axis are printed with a really small font, which makes them unreadable. I've tried to scale them with
with plt.rc_context(dict(sns.axes_style("whitegrid"),
**sns.plotting_context(font_scale=5))):
b = sns.violinplot(y="Draughts", data=dr)
To no help, this only makes the axis text larger, but not the number along the axis.
Solution
The answer from here makes fonts larger in seaborn
...
import pandas as pd, numpy as np, seaborn as sns
from matplotlib import pyplot as plt
# Generate data
df = pd.DataFrame({"Draughts": np.random.randn(100)})
# Plot using seaborn
sns.set(font_scale = 2)
b = sns.violinplot(y = "Draughts", data = df)
plt.show()
Answered By - p-robot
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.