I'm pretty new to using seaborn. I'm trying to add custom lines (nothing like regression or anything like that) to this scatter plot:
This is the code I'm using for plotting the data:
sns.set(font_scale=2, style='ticks')
plt.figure(figsize=(7, 10))
plt.xscale('log')
plt.yscale('log')
sns.scatterplot(data=degrees_2020, x="degree_20", y="len", legend = "full")
sns.scatterplot(data=degrees_2019, x="degree_19", y="len", legend = "full")
sns.scatterplot(data=degrees_2018, x="degree_18", y="len", legend = "full")
sns.scatterplot(data=degrees_2017, x="degree_17", y="len", legend = "full")
plt.legend(loc = 'lower right', labels=["2021","2020","2019", "2018"])
plt.show ()
And this one of the dataframes:
degree_20 len
1 16 1581
2 16 1581
3 16 1581
4 16 1581
... ... ... ...
1705 32 1926
1706 57 2196
1707 44 2098
1708 95 2246
1709 131 2286
This is the code I used for generating the scatter plot. Basically, I want to add two lines, just to guide the eye not fitting the data points. These two for example, would be len~k and len~k2 .
I can't find a way to custom-add these two lines to the plot using seaborn. I'm wondering if it's doable and if you have any tips or ticks I'd appreciate it.
Many thanks!