My dataset contains data for 2018. I tried plotting a simple scatterplot, and for some reason seaborn plots from 2000 - 2018. I haven't found a solution for this.
seaborn lineplot works.
Matplotlib scatter also works with no issue.
Code:
plt.figure(figsize = (7,7), dpi = 200)
sns.scatterplot(x = df["Date"].values,
y = df["values"].values)
plt.show()
You can manually set the limits of the x axis by using .set()
on the plot.
ax = sns.scatterplot(x = df["Date"].values, y = df["values"].values)
ax.set(xlim = ('2018-01-01', '2018-12-31'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With