I am trying to show the points of intersection on the graph but the problem is that the shape of my data is different when i am ploting them simple i get the results
this is my code of graph
plt.plot(x,color='green')
plt.plot(y, color='blue')
plt.plot(z, color='orange')
plt.legend()
plt.show()
But when i am trying to find the point of intersection i am getting error
unsupported operand type(s) for -: 'list' and 'list'
on this line
idx = np.argwhere(np.diff(np.sign(y - x))).flatten()
this is my code to find the point of intersection which is not working
import numpy as np
import matplotlib.pyplot as plt
x=test1.history['acc']
y=test2,.history['acc']
z=test3.history['acc']
plt.plot(x, y, '-')
plt.plot(x, z, '-')
idx = np.argwhere(np.diff(np.sign(y - x))).flatten()
plt.plot(x[idx], y[idx],z[idx], 'ro')
plt.show()
I am getting the result but it is not valid it is showing the results like this