I have two lists where each element is a tuple that should be interpreted as
x = [(x1_begin, x1_end), (x2_begin, x2_end), ... , (xn_begin, xn_end)]
y = [(y1_begin, y1_end), (y2_begin, y2_end), ... , (yn_begin, yn_end)]
In one figure, I would like to plot all these points and draw lines only between (yi_begin, yi_end)
vs (xi_begin, xi_end)
for all i.
The following code manages to plot all the points. But I'm not sure how to draw the lines properly between the points. Any help is much appreciated.
import matplotlib.pyplot as plt
x = [(1, 27), (32, 55), (56, 80), (84, 103)]
y = [(5, 7), (3, 6), (4, 9), (6, 11)]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(x, y, color='black')
plt.show()