I'm trying to plot time slots. I have two ndarrays of 'start' and 'end' points. I want to draw it as chunks on a figure. Keep in mind that the chunks are not consecutive and there are gaps between the slots.
Until now I have tried to use patches:
for x_1 , x_2 in zip(s_data['begin'].values ,s_data['end'].values):
ax1.add_patch(Rectangle((x_1,0),x_2-x_1,0.5))
plt.show()
But its only giving me hald blue figure.
While I want something like this