Following is the simple dataset =
x = [7.5, 7.5, 17.5]
y = [393.198, 351.352, 351.352]
The output plot I am looking for is correctly produced by –
plt.plot(x,y) #right angle looking plot
However, I get weird plot when I do this in Seaborn –
sns.lineplot(x=x,y=y)
I don’t understand why Seaborn is producing this plot and how do I modify the Seaborn code to get the plot produced by Matplotlib?
>Solution :
Seaborn try doing some estimation and sorting with the data for better visualization of the relationship between x and y (document).
The below code produce the same chart with matplotlib
sns.lineplot(x=x,y=y, estimator=None, sort=False)