I am having trouble connecting two sets of points in a scatter plot with each other such that a line (in this example, using dummy data) connects all the 'pre' points with the corresponding 'post' points. The 'marker = 'o-' argument doesn't work for plt. scatter, but does for plt. plot. Suggestions on how to connect the corresponding values? Thanks and hope this question makes sense!
import matplotlib.pyplot as plt
import numpy as np
x1 = ["pre"] * 4
x2 = ["post"] * 4
y1 = [0.1, 0.15, 0.13, 0.25]
y2 = [0.85, 0.76, 0.8, 0.9]
plt.scatter(x1, y1, color='y')
plt.scatter(x2, y2, color='g')
plt.show()