Home > Enterprise >  How do I fit my X - Axis labels on my plot
How do I fit my X - Axis labels on my plot

Time:11-30

I cant seem to find a way to fit my x labels in the right way on my plot. Can someone help ?

here is the code and the output is in the picture

Code:

sns.lineplot(x="ds", y="y", data=df_new, hue="Type", marker="o")

enter image description here

CodePudding user response:

You should be able to rotate your xlabels, which makes your plot more readable. Try:

ax = sns.lineplot(x="ds", y="y", data=df_new, hue="Type", marker="o")
ax.tick_params(axis='x', labelrotation=45)

And then plotting your data.

  • Related