I have some basic knowledge of Python and just started to study plotting with Python.
Here is a sample dataset I have:
Item | StartPoint | EndPoint | Type | Value |
---|---|---|---|---|
A | 800 | 1000 | 1 | 10 |
A | 700 | 815 | 2 | 20 |
A | 850 | 900 | 2 | 40 |
A | 900 | 990 | 2 | 30 |
The chart should looks like:
So, it reads the min[start point]
and max[end point]
to set the ymin
and ymax
.
Taking the first row as an example, it draws a line at y= 800
with a value 10
and draws another line at y = 1000
, then fills the gap between those two lines based on the type (different types will be filled with different colors).
Another example, the second row draws a line at y = 700
with a value 20
and another line at y = 815
, then it fills the gap between the two lines with a different color (because the type is different).
Is this something possible to do? Any help will be much appreciated! Thanks for all the kindness in advance.