I have the following DataSet given:
intervall_start intervall_ende variable value time
0 2019-08-01 05:00:00 2019-08-01 05:15:00 Door_1 30.0 5.00
1 2019-08-01 05:15:00 2019-08-01 05:30:00 Door_1 55.0 5.25
2 2019-08-01 05:45:00 2019-08-01 06:00:00 Door_2 114.0 5.75
3 2019-08-01 06:00:00 2019-08-01 06:15:00 Door_1 84.0 6.00
4 2019-08-01 06:15:00 2019-08-01 06:30:00 Door_2 23.0 6.25
...
When I run pn.ggplot(df, pn.aes(x="time", y="value", colour="variable")) + pn.geom_point(stat="identity") + pn.theme(axis_text_x = pn.element_text(angle=90))
it gives me this plot:
When I run the plotnine line with geom_line
instead of geom_point
I get this plot:
But this is not what I want! My DataFrame
contains many values from the 2018-08-01
to the 2018-08-31
. The column time
is the time for each day independent from the date it happend. My goal is now to print one line for each time
. So I would get 96 lines. Why 96? Because I have a 15min interval and the day has 24 hours -> 24 * 4 = 96
.
And this plot should be grouped by variable
so I know to which variable
the line belongs.
How can I do this?
This is what I want to have at the end. I want to have one line for each day by time and value. The color should illustrate the variable! Take a look on the x axis, this goes from 0 to 24 because the day has 24 hours. And the column time gives us this the time of the day!
Kind regards