a = df.iloc[[i for i in range(0, len(df)) if df['x'][i] == df['y'][i]]].plot(x
    ='x', y='y', color='red')
df.iloc[[i for i in range(0, len(df)) if df['y'][i] == df['x'][i] ** 2]].plot(
    x='x', y='y', color='blue', ax=a)
plt.show()
Plotting multiple lines with pandas dataframe