I'm trying to plot two data sets with Seaborn, this is my code.
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
sns.axes_style("ticks")
ss_data = pd.read_csv('A.csv')
ks_data = pd.read_csv('B.csv')
g = sns.lineplot(data=ks_data, x="K", y="pd", dashes=False)
sns.lineplot(data=ss_data, x="K", y="pd", dashes=False)
g.set_xticks(range(0,22,4))
plt.legend(labels=["A", "B"])
plt.savefig("test.png", dpi=500)
But this is the graph I am getting, as you can see, the legend doesn't correctly show the line colour for B.
I think it's probably due to the way that I am adding the second lineplot to the graph, but I couldn't make it work any other way.