Home > OS >  histogram of event data
histogram of event data

Time:04-09

I have the following data:

    start_time               end_time         duration       ic_total             mc_total
0   2022-01-01 10:00:00 2022-01-01 19:00:00    9.0             0.0            1.7780003947160878
1   2022-01-02 00:00:00 2022-01-02 10:00:00    10.0            0.0                  0.0
2   2022-01-02 17:00:00 2022-01-03 02:00:00    9.0      0.7620001691640255    1.7780003947160594
3   2022-01-03 02:00:00 2022-01-04 12:00:00    34.0     3.810000845820184     4.31800095859623
4   2022-01-07 21:00:00 2022-01-08 06:00:00    9.0      10.287002283714486    1.016000225552034
5   2022-01-16 05:00:00 2022-01-16 20:00:00    15.0            0.0                  0.0
6   2022-01-19 04:00:00 2022-01-19 17:00:00    13.0     2.286000507492133     0.5926667982386957
7   2022-01-21 14:00:00 2022-01-22 00:00:00    10.0     1.7780003947160736          0.0
8   2022-01-27 02:00:00 2022-01-27 16:00:00    14.0     14.986003326892735     9.588502128647471

in a dataframe.

How can I produce a plot with bars whose width are defined by the duration column, and height by the ic_total value?, and whos position on the x axis is defined by the start and end time?

CodePudding user response:

Sounds like a step function plot to me, for which you can use enter image description here

  • Related