Try specifying the x
and y
of the call to sns.lineplot
?
import pandas as pd
import numpy as np
import seaborn as sns
x = np.arange(10)
df1 = pd.DataFrame({'x':x,
'y':np.sin(x)})
df2 = pd.DataFrame({'x':x,
'y':x**2})
sns.lineplot(data=df1, x='x', y='y', color="red")
sns.lineplot(data=df2, x='x', y='y')
Without doing so, I get a similar plot as yours.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…