Bar chart with a y range Mathplotlib

Viewed 31

enter image description here

I'm trying to create a graph like above which would show a processes start and end along with the amount of time it ran. So process a started at 1 second and ran for over 3 seconds.

I've tried:

...
plt.bar([1, 2, 3], [(1, 1.3), (1.1, 3), (1.2, 2)], label="test chart")
...

This same code works for a normal bar chart if I remove the tuples for the x values.

Any idea how this is done?

0 Answers
Related