I'm trying to compare my predicted output and the test data using matplotlib.As I'm new to python I'm not able to find how to connect each entry with line like in this photo. I was able to write a code like this which compares the Y coordinate and entries but I'm unable to map each entry of test data with predicted output with a line
X_1 = range(len(Y_test))
plt.figure(figsize=(5,5))
plt.scatter(X_1, output, label='Y_output',alpha=0.3)
plt.scatter(X_1, Y_test, label='Y_test',alpha=0.3)
plt.title("Scatter Plot")
plt.legend()
plt.xlabel("entries")
plt.ylabel("Y value")
plt.show()