I'm trying to plot a Scatter plot with a single y-axis and multiple x-axis as below using plotly-python.
Sample data
timeData = ['2009/6/12 5:00', '2009/6/12 7:00', '2009/6/12 9:00', '2009/6/12 13:00', '2009/6/12 15:00', '2009/6/12 17:00', '2009/6/12 21:00', '2009/6/13 1:00', '2009/6/13 5:00', '2009/6/13 7:00', '2009/6/13 9:00', '2009/6/13 13:00', '2009/6/13 15:00', '2009/6/13 17:00', '2009/6/13 21:00', '2009/6/14 1:00', '2009/6/14 5:00', '2009/6/14 7:00', '2009/6/14 9:00', '2009/6/14 13:00', '2009/6/14 15:00', '2009/6/14 17:00', '2009/6/14 21:00', '2009/6/15 1:00', '2009/6/15 5:00', '2009/6/15 7:00', '2009/6/15 9:00', '2009/6/15 13:00', '2009/6/15 15:00', '2009/6/15 17:00', '2009/6/15 21:00', '2009/6/16 1:00', '2009/6/16 5:00', '2009/6/16 7:00', '2009/6/16 9:00', '2009/6/16 13:00', '2009/6/16 15:00', '2009/6/16 17:00', '2009/6/16 21:00', '2009/6/17 1:00', '2009/6/17 5:00', '2009/6/17 7:00', '2009/6/17 9:00', '2009/6/17 13:00', '2009/6/17 15:00', '2009/6/17 17:00', '2009/6/17 21:00', '2009/6/18 1:00', '2009/6/18 5:00', '2009/6/18 7:00', '2009/6/18 9:00', '2009/6/18 13:00', '2009/6/18 15:00', '2009/6/18 17:00', '2009/6/18 21:00', '2009/6/19 1:00', '2009/6/19 5:00', '2009/6/19 7:00', '2009/6/19 9:00', '2009/6/19 13:00', '2009/6/19 15:00', '2009/6/19 17:00', '2009/6/19 21:00', '2009/6/20 1:00', '2009/6/20 5:00', '2009/6/20 7:00', '2009/6/20 9:00', '2009/6/20 13:00', '2009/6/20 15:00', '2009/6/20 17:00', '2009/6/20 21:00', '2009/6/21 1:00', '2009/6/21 5:00', '2009/6/21 7:00', '2009/6/21 9:00', '2009/6/21 13:00', '2009/6/21 15:00', '2009/6/21 17:00', '2009/6/21 21:00', '2009/6/22 1:00', '2009/6/22 5:00', '2009/6/22 7:00', '2009/6/22 9:00', '2009/6/22 13:00', '2009/6/22 15:00', '2009/6/22 17:00', '2009/6/22 21:00', '2009/6/23 1:00', '2009/6/23 7:00', '2009/6/23 9:00', '2009/6/23 11:00', '2009/6/23 15:00', '2009/6/23 17:00', '2009/6/23 19:00', '2009/6/23 23:00', '2009/6/24 5:00', '2009/6/24 9:00', '2009/6/24 11:00', '2009/6/24 13:00', '2009/6/24 17:00', '2009/6/24 19:00', '2009/6/24 21:00', '2009/6/25 1:00', '2009/6/25 7:00', '2009/6/25 11:00', '2009/6/25 13:00', '2009/6/25 15:00', '2009/6/25 19:00', '2009/6/25 21:00', '2009/6/25 23:00', '2009/6/27 5:00', '2009/6/27 9:00', '2009/6/27 13:00', '2009/6/27 15:00', '2009/6/27 17:00', '2009/6/27 21:00', '2009/6/27 23:00', '2009/6/28 1:00', '2009/6/28 5:00', '2009/6/28 9:00', '2009/6/28 13:00', '2009/6/28 15:00', '2009/6/28 17:00', '2009/6/28 21:00', '2009/6/28 23:00', '2009/6/29 1:00', '2009/6/29 5:00', '2009/6/29 9:00', '2009/6/29 13:00', '2009/6/29 15:00', '2009/6/29 17:00', '2009/6/29 21:00', '2009/6/29 23:00', '2009/6/30 1:00', '2009/6/30 5:00', '2009/6/30 9:00', '2009/6/30 13:00', '2009/6/30 15:00', '2009/6/30 17:00', '2009/6/30 21:00', '2009/6/30 23:00', '2009/7/2 1:00', '2009/7/2 5:00', '2009/7/2 9:00', '2009/7/2 13:00', '2009/7/2 15:00', '2009/7/2 17:00', '2009/7/2 21:00', '2009/7/2 23:00', '2009/7/3 1:00', '2009/7/3 5:00', '2009/7/3 9:00', '2009/7/3 13:00', '2009/7/3 15:00', '2009/7/3 17:00', '2009/7/3 21:00', '2009/7/3 23:00', '2009/7/5 1:00', '2009/7/5 5:00', '2009/7/5 9:00', '2009/7/5 13:00', '2009/7/5 15:00', '2009/7/5 17:00', '2009/7/5 21:00', '2009/7/5 23:00', '2009/7/6 1:00', '2009/7/6 5:00', '2009/7/6 9:00', '2009/7/6 13:00', '2009/7/6 15:00', '2009/7/6 17:00', '2009/7/6 21:00', '2009/7/6 23:00', '2009/7/7 1:00', '2009/7/7 5:00', '2009/7/7 9:00', '2009/7/7 13:00', '2009/7/7 15:00', '2009/7/7 17:00', '2009/7/7 21:00', '2009/7/7 23:00', '2009/7/8 1:00', '2009/7/8 5:00', '2009/7/8 9:00', '2009/7/8 13:00', '2009/7/8 15:00', '2009/7/8 17:00', '2009/7/8 21:00', '2009/7/8 23:00', '2009/7/9 1:00', '2009/7/9 5:00', '2009/7/9 9:00', '2009/7/9 13:00', '2009/7/9 15:00', '2009/7/9 17:00', '2009/7/9 21:00', '2009/7/9 23:00', '2009/7/10 1:00', '2009/7/10 5:00', '2009/7/10 9:00', '2009/7/10 13:00', '2009/7/10 15:00', '2009/7/10 17:00', '2009/7/10 21:00', '2009/7/10 23:00', '2009/7/11 1:00', '2009/7/11 5:00', '2009/7/11 9:00', '2009/7/11 13:00', '2009/7/11 15:00', '2009/7/11 17:00', '2009/7/11 21:00', '2009/7/11 23:00', '2009/7/12 1:00', '2009/7/12 5:00', '2009/7/12 9:00', '2009/7/12 13:00', '2009/7/12 15:00', '2009/7/12 17:00', '2009/7/12 21:00', '2009/7/12 23:00', '2009/7/13 1:00', '2009/7/13 5:00', '2009/7/13 9:00', '2009/7/13 13:00', '2009/7/13 15:00', '2009/7/13 17:00', '2009/7/13 21:00', '2009/7/13 23:00', '2009/7/14 1:00', '2009/7/14 5:00', '2009/7/14 9:00', '2009/7/14 13:00', '2009/7/14 15:00', '2009/7/14 17:00', '2009/7/14 21:00', '2009/7/14 23:00', '2009/7/15 1:00', '2009/7/15 5:00', '2009/7/15 9:00', '2009/7/15 13:00', '2009/7/15 15:00', '2009/7/15 17:00', '2009/7/15 21:00', '2009/7/15 23:00', '2009/7/16 1:00', '2009/7/16 5:00', '2009/7/16 9:00', '2009/7/16 13:00', '2009/7/16 15:00', '2009/7/16 17:00', '2009/7/16 21:00', '2009/7/16 23:00', '2009/7/17 1:00', '2009/7/17 5:00', '2009/7/17 9:00', '2009/7/17 13:00', '2009/7/17 15:00', '2009/7/17 17:00', '2009/7/17 21:00', '2009/7/17 23:00', '2009/7/18 1:00', '2009/7/18 5:00', '2009/7/18 9:00', '2009/7/18 13:00', '2009/7/18 15:00', '2009/7/18 17:00', '2009/7/18 21:00', '2009/7/18 23:00', '2009/7/19 1:00', '2009/7/19 5:00', '2009/7/19 9:00', '2009/7/19 13:00', '2009/7/19 15:00', '2009/7/19 17:00', '2009/7/19 21:00', '2009/7/19 23:00', '2009/7/20 1:00', '2009/7/20 5:00', '2009/7/20 9:00', '2009/7/20 13:00', '2009/7/20 15:00', '2009/7/20 17:00', '2009/7/20 21:00', '2009/7/20 23:00', '2009/7/21 1:00', '2009/7/21 6:00', '2009/7/21 10:00', '2009/7/21 14:00', '2009/7/21 16:00', '2009/7/21 18:00', '2009/7/21 22:00', '2009/7/22 0:00', '2009/7/22 3:00', '2009/7/22 7:00', '2009/7/22 11:00', '2009/7/22 15:00', '2009/7/22 17:00', '2009/7/22 19:00', '2009/7/22 23:00', '2009/7/23 1:00', '2009/7/23 4:00', '2009/7/23 8:00', '2009/7/23 12:00', '2009/7/23 16:00', '2009/7/23 18:00', '2009/7/23 20:00', '2009/7/24 0:00', '2009/7/24 3:00', '2009/7/24 5:00', '2009/7/24 9:00', '2009/7/24 13:00', '2009/7/24 17:00', '2009/7/24 19:00', '2009/7/24 21:00', '2009/7/25 1:00', '2009/7/25 4:00', '2009/7/25 6:00', '2009/7/25 10:00', '2009/7/25 14:00', '2009/7/25 18:00', '2009/7/25 20:00', '2009/7/25 22:00', '2009/7/26 3:00', '2009/7/26 5:00', '2009/7/26 7:00', '2009/7/26 11:00', '2009/7/26 15:00', '2009/7/26 19:00', '2009/7/26 21:00', '2009/7/26 23:00', '2009/7/27 3:00', '2009/7/27 5:00', '2009/7/27 7:00', '2009/7/27 11:00', '2009/7/27 15:00', '2009/7/27 19:00', '2009/7/27 21:00', '2009/7/27 23:00', '2009/7/28 3:00', '2009/7/28 5:00', '2009/7/28 7:00', '2009/7/28 11:00', '2009/7/28 15:00', '2009/7/28 19:00', '2009/7/28 21:00', '2009/7/28 23:00', '2009/7/29 3:00', '2009/7/29 5:00', '2009/7/29 7:00', '2009/7/29 11:00', '2009/7/29 15:00', '2009/7/29 19:00', '2009/7/29 21:00', '2009/7/29 23:00', '2009/7/30 3:00', '2009/7/30 5:00', '2009/7/30 7:00', '2009/7/30 11:00', '2009/7/30 15:00', '2009/7/30 19:00', '2009/7/30 21:00', '2009/7/30 23:00', '2009/7/31 3:00', '2009/7/31 5:00', '2009/7/31 7:00', '2009/7/31 11:00', '2009/7/31 15:00', '2009/7/31 19:00', '2009/7/31 21:00', '2009/7/31 23:00', '2009/8/1 3:00', '2009/8/1 5:00', '2009/8/1 7:00', '2009/8/1 11:00', '2009/8/1 15:00', '2009/8/1 19:00', '2009/8/1 21:00', '2009/8/1 23:00', '2009/8/2 3:00', '2009/8/2 5:00', '2009/8/2 7:00', '2009/8/2 11:00', '2009/8/2 15:00', '2009/8/2 19:00', '2009/8/2 21:00', '2009/8/2 23:00', '2009/8/3 3:00', '2009/8/3 5:00', '2009/8/3 7:00', '2009/8/3 11:00', '2009/8/3 15:00', '2009/8/3 19:00', '2009/8/3 21:00', '2009/8/3 23:00', '2009/8/4 3:00', '2009/8/4 5:00', '2009/8/4 7:00', '2009/8/4 11:00', '2009/8/4 15:00', '2009/8/4 19:00', '2009/8/4 21:00', '2009/8/4 23:00', '2009/8/5 3:00', '2009/8/5 5:00', '2009/8/5 7:00', '2009/8/5 11:00', '2009/8/5 15:00', '2009/8/5 19:00', '2009/8/5 21:00', '2009/8/5 23:00', '2009/8/6 3:00', '2009/8/6 5:00', '2009/8/6 7:00', '2009/8/6 11:00', '2009/8/6 15:00', '2009/8/6 19:00', '2009/8/6 21:00', '2009/8/6 23:00', '2009/8/7 3:00', '2009/8/7 5:00', '2009/8/7 7:00', '2009/8/7 11:00', '2009/8/7 15:00', '2009/8/7 19:00', '2009/8/7 21:00', '2009/8/7 23:00', '2009/8/8 3:00', '2009/8/8 5:00', '2009/8/8 7:00', '2009/8/8 11:00', '2009/8/8 15:00', '2009/8/8 19:00', '2009/8/8 21:00', '2009/8/8 23:00', '2009/8/9 3:00', '2009/8/9 5:00', '2009/8/9 7:00', '2009/8/9 11:00', '2009/8/9 15:00', '2009/8/9 19:00', '2009/8/9 21:00', '2009/8/9 23:00', '2009/8/10 3:00', '2009/8/10 5:00', '2009/8/10 7:00', '2009/8/10 11:00', '2009/8/10 15:00', '2009/8/10 19:00', '2009/8/10 21:00', '2009/8/10 23:00', '2009/8/11 3:00', '2009/8/11 5:00', '2009/8/11 7:00', '2009/8/11 11:00', '2009/8/11 15:00', '2009/8/11 19:00', '2009/8/11 21:00', '2009/8/11 23:00', '2009/8/12 3:00', '2009/8/12 5:00', '2009/8/12 7:00', '2009/8/12 11:00', '2009/8/12 15:00', '2009/8/12 19:00', '2009/8/12 21:00', '2009/8/12 23:00', '2009/8/13 3:00', '2009/8/13 5:00', '2009/8/13 7:00', '2009/8/13 11:00', '2009/8/13 15:00', '2009/8/13 19:00', '2009/8/13 21:00', '2009/8/13 23:00', '2009/8/14 3:00', '2009/8/14 5:00', '2009/8/14 7:00', '2009/8/14 11:00', '2009/8/14 15:00', '2009/8/14 19:00', '2009/8/14 21:00', '2009/8/14 23:00', '2009/8/15 3:00', '2009/8/15 5:00', '2009/8/15 7:00', '2009/8/15 11:00', '2009/8/15 15:00', '2009/8/15 19:00', '2009/8/15 21:00', '2009/8/15 23:00', '2009/8/16 3:00', '2009/8/16 5:00', '2009/8/16 7:00', '2009/8/16 11:00', '2009/8/16 15:00', '2009/8/16 19:00', '2009/8/16 21:00', '2009/8/16 23:00', '2009/8/17 3:00', '2009/8/17 5:00', '2009/8/17 7:00', '2009/8/17 11:00', '2009/8/17 15:00', '2009/8/17 19:00', '2009/8/17 21:00', '2009/8/17 23:00', '2009/8/18 3:00', '2009/8/18 5:00', '2009/8/18 7:00', '2009/8/18 11:00', '2009/8/18 15:00', '2009/8/18 19:00', '2009/8/18 21:00', '2009/8/18 23:00', '2009/8/19 3:00', '2009/8/19 5:00', '2009/8/19 7:00', '2009/8/19 11:00', '2009/8/19 15:00', '2009/8/19 19:00', '2009/8/19 21:00', '2009/8/19 23:00', '2009/8/20 3:00', '2009/8/20 5:00', '2009/8/20 7:00', '2009/8/20 11:00', '2009/8/20 15:00', '2009/8/20 19:00', '2009/8/20 21:00', '2009/8/20 23:00', '2009/8/21 3:00', '2009/8/21 5:00', '2009/8/21 7:00', '2009/8/21 11:00', '2009/8/21 15:00', '2009/8/21 19:00', '2009/8/21 21:00', '2009/8/21 23:00', '2009/8/22 3:00', '2009/8/22 5:00', '2009/8/22 7:00', '2009/8/22 11:00', '2009/8/22 15:00', '2009/8/22 19:00', '2009/8/22 21:00', '2009/8/22 23:00', '2009/8/23 3:00', '2009/8/23 5:00', '2009/8/23 7:00', '2009/8/23 11:00', '2009/8/23 15:00', '2009/8/23 19:00', '2009/8/23 21:00', '2009/8/23 23:00', '2009/8/24 3:00', '2009/8/24 5:00', '2009/8/24 7:00', '2009/8/24 11:00', '2009/8/24 15:00', '2009/8/24 19:00', '2009/8/24 21:00', '2009/8/24 23:00', '2009/8/25 3:00', '2009/8/25 5:00', '2009/8/25 7:00', '2009/8/25 11:00', '2009/8/25 15:00', '2009/8/25 19:00', '2009/8/25 21:00', '2009/8/25 23:00', '2009/8/26 3:00', '2009/8/26 5:00', '2009/8/26 7:00', '2009/8/26 11:00', '2009/8/26 15:00', '2009/8/26 19:00', '2009/8/26 21:00', '2009/8/26 23:00', '2009/8/27 3:00', '2009/8/27 5:00', '2009/8/27 7:00', '2009/8/27 11:00', '2009/8/27 15:00', '2009/8/27 19:00', '2009/8/27 21:00', '2009/8/27 23:00', '2009/8/28 3:00', '2009/8/28 5:00', '2009/8/28 7:00', '2009/8/28 11:00', '2009/8/28 15:00', '2009/8/28 19:00', '2009/8/28 21:00', '2009/8/28 23:00', '2009/8/29 3:00', '2009/8/29 5:00', '2009/8/29 7:00', '2009/8/29 11:00', '2009/8/29 15:00', '2009/8/29 19:00', '2009/8/29 21:00', '2009/8/29 23:00', '2009/8/30 3:00', '2009/8/30 5:00', '2009/8/30 7:00', '2009/8/30 11:00', '2009/8/30 15:00', '2009/8/30 19:00', '2009/8/30 21:00', '2009/8/30 23:00', '2009/8/31 3:00', '2009/8/31 5:00', '2009/8/31 7:00', '2009/8/31 11:00', '2009/8/31 15:00', '2009/8/31 19:00', '2009/8/31 21:00', '2009/8/31 23:00', '2009/9/1 3:00', '2009/9/1 5:00', '2009/9/1 7:00', '2009/9/1 11:00', '2009/9/1 15:00', '2009/9/1 19:00', '2009/9/1 21:00', '2009/9/1 23:00', '2009/9/2 3:00', '2009/9/2 5:00', '2009/9/2 7:00', '2009/9/2 11:00', '2009/9/2 15:00', '2009/9/2 19:00', '2009/9/2 21:00', '2009/9/2 23:00', '2009/9/3 3:00', '2009/9/3 5:00', '2009/9/3 7:00', '2009/9/3 11:00', '2009/9/3 15:00', '2009/9/3 19:00', '2009/9/3 21:00', '2009/9/3 23:00', '2009/9/4 3:00', '2009/9/4 5:00', '2009/9/4 7:00', '2009/9/4 11:00', '2009/9/4 15:00', '2009/9/4 19:00', '2009/9/4 21:00', '2009/9/4 23:00', '2009/9/5 3:00', '2009/9/5 5:00', '2009/9/5 7:00', '2009/9/5 11:00', '2009/9/5 15:00', '2009/9/5 19:00', '2009/9/5 21:00', '2009/9/5 23:00', '2009/9/6 3:00', '2009/9/6 5:00', '2009/9/6 7:00', '2009/9/6 11:00', '2009/9/6 15:00', '2009/9/6 19:00', '2009/9/6 21:00', '2009/9/6 23:00', '2009/9/7 3:00', '2009/9/7 5:00', '2009/9/7 7:00', '2009/9/7 11:00', '2009/9/7 15:00', '2009/9/7 19:00', '2009/9/7 21:00', '2009/9/7 23:00', '2009/9/8 3:00', '2009/9/8 5:00', '2009/9/8 7:00', '2009/9/8 11:00', '2009/9/8 15:00', '2009/9/8 19:00', '2009/9/8 21:00', '2009/9/8 23:00', '2009/9/9 3:00', '2009/9/9 5:00', '2009/9/9 7:00', '2009/9/9 11:00', '2009/9/9 15:00', '2009/9/9 19:00', '2009/9/9 21:00', '2009/9/9 23:00', '2009/9/10 3:00', '2009/9/10 5:00', '2009/9/10 7:00', '2009/9/10 11:00', '2009/9/10 15:00', '2009/9/10 19:00', '2009/9/10 21:00', '2009/9/10 23:00', '2009/9/11 3:00', '2009/9/11 5:00', '2009/9/11 7:00', '2009/9/11 11:00', '2009/9/11 15:00', '2009/9/11 19:00', '2009/9/11 21:00', '2009/9/11 23:00', '2009/9/12 3:00', '2009/9/12 5:00', '2009/9/12 7:00', '2009/9/12 11:00', '2009/9/12 15:00', '2009/9/12 19:00', '2009/9/12 21:00', '2009/9/12 23:00', '2009/9/13 3:00', '2009/9/13 5:00', '2009/9/13 7:00', '2009/9/13 11:00', '2009/9/13 15:00', '2009/9/13 19:00', '2009/9/13 21:00', '2009/9/13 23:00', '2009/9/14 3:00', '2009/9/14 5:00', '2009/9/14 7:00', '2009/9/14 11:00', '2009/9/14 15:00', '2009/9/14 19:00', '2009/9/14 21:00', '2009/9/14 23:00', '2009/9/15 3:00', '2009/9/15 5:00', '2009/9/15 7:00', '2009/9/15 11:00', '2009/9/15 15:00', '2009/9/15 19:00', '2009/9/15 21:00', '2009/9/15 23:00', '2009/9/16 3:00', '2009/9/16 5:00', '2009/9/16 7:00', '2009/9/16 11:00', '2009/9/16 15:00', '2009/9/16 19:00', '2009/9/16 21:00', '2009/9/16 23:00', '2009/9/17 3:00', '2009/9/17 5:00', '2009/9/17 7:00', '2009/9/17 11:00', '2009/9/17 15:00', '2009/9/17 19:00', '2009/9/17 21:00', '2009/9/17 23:00', '2009/9/18 3:00', '2009/9/18 5:00', '2009/9/18 7:00', '2009/9/18 11:00', '2009/9/18 15:00', '2009/9/18 19:00', '2009/9/18 21:00', '2009/9/18 23:00', '2009/9/19 3:00', '2009/9/19 5:00', '2009/9/19 7:00', '2009/9/19 11:00', '2009/9/19 15:00', '2009/9/19 19:00', '2009/9/19 21:00', '2009/9/19 23:00', '2009/9/20 3:00', '2009/9/20 5:00', '2009/9/20 7:00', '2009/9/20 11:00', '2009/9/20 15:00', '2009/9/20 19:00', '2009/9/20 21:00', '2009/9/20 23:00', '2009/9/21 3:00', '2009/9/21 5:00', '2009/9/21 7:00', '2009/9/21 11:00', '2009/9/21 15:00', '2009/9/21 19:00', '2009/9/21 21:00', '2009/9/21 23:00', '2009/9/22 3:00', '2009/9/22 5:00', '2009/9/22 7:00', '2009/9/22 11:00', '2009/9/22 15:00', '2009/9/22 19:00', '2009/9/22 21:00', '2009/9/22 23:00', '2009/9/23 3:00', '2009/9/23 5:00', '2009/9/23 7:00', '2009/9/23 11:00', '2009/9/23 15:00', '2009/9/23 19:00', '2009/9/23 21:00', '2009/9/23 23:00', '2009/9/24 3:00', '2009/9/24 5:00', '2009/9/24 7:00', '2009/9/24 11:00', '2009/9/24 15:00', '2009/9/24 19:00', '2009/9/24 21:00', '2009/9/24 23:00', '2009/9/25 3:00', '2009/9/25 5:00', '2009/9/25 7:00', '2009/9/25 11:00', '2009/9/25 15:00', '2009/9/25 19:00', '2009/9/25 21:00', '2009/9/25 23:00', '2009/9/26 3:00', '2009/9/26 5:00', '2009/9/26 7:00', '2009/9/26 11:00', '2009/9/26 15:00', '2009/9/26 19:00', '2009/9/26 21:00', '2009/9/26 23:00', '2009/9/27 3:00', '2009/9/27 5:00', '2009/9/27 7:00', '2009/9/27 11:00', '2009/9/27 15:00', '2009/9/27 19:00', '2009/9/27 21:00', '2009/9/27 23:00', '2009/9/28 3:00', '2009/9/28 5:00', '2009/9/28 7:00', '2009/9/28 11:00', '2009/9/28 15:00', '2009/9/28 19:00', '2009/9/28 21:00', '2009/9/28 23:00', '2009/9/29 3:00', '2009/9/29 5:00', '2009/9/29 7:00', '2009/9/29 11:00', '2009/9/29 15:00', '2009/9/29 19:00', '2009/9/29 21:00', '2009/9/29 23:00', '2009/9/30 3:00', '2009/9/30 5:00', '2009/9/30 7:00', '2009/9/30 11:00', '2009/9/30 15:00', '2009/9/30 19:00', '2009/9/30 21:00', '2009/9/30 23:00', '2009/10/1 3:00', '2009/10/1 5:00', '2009/10/1 7:00', '2009/10/1 11:00', '2009/10/1 15:00', '2009/10/1 19:00', '2009/10/1 21:00', '2009/10/1 23:00', '2009/10/2 3:00', '2009/10/2 5:00', '2009/10/2 7:00', '2009/10/2 11:00', '2009/10/2 15:00', '2009/10/2 19:00', '2009/10/2 21:00', '2009/10/2 23:00', '2009/10/3 3:00', '2009/10/3 5:00', '2009/10/3 7:00', '2009/10/3 11:00', '2009/10/3 15:00', '2009/10/3 19:00', '2009/10/3 21:00', '2009/10/3 23:00', '2009/10/4 3:00', '2009/10/4 5:00', '2009/10/4 7:00', '2009/10/4 11:00', '2009/10/4 15:00', '2009/10/4 19:00', '2009/10/4 21:00', '2009/10/4 23:00', '2009/10/5 3:00', '2009/10/5 5:00', '2009/10/5 7:00', '2009/10/5 11:00', '2009/10/5 15:00', '2009/10/5 19:00', '2009/10/5 21:00', '2009/10/5 23:00', '2009/10/6 3:00', '2009/10/6 5:00', '2009/10/6 7:00', '2009/10/6 11:00', '2009/10/6 15:00', '2009/10/6 19:00', '2009/10/6 21:00', '2009/10/6 23:00', '2009/10/7 3:00', '2009/10/7 5:00', '2009/10/7 7:00', '2009/10/7 11:00', '2009/10/7 15:00', '2009/10/7 19:00', '2009/10/7 21:00', '2009/10/7 23:00', '2009/10/8 3:00', '2009/10/8 5:00', '2009/10/8 7:00', '2009/10/8 11:00', '2009/10/8 15:00', '2009/10/8 19:00', '2009/10/8 21:00', '2009/10/8 23:00', '2009/10/9 3:00', '2009/10/9 5:00', '2009/10/9 7:00', '2009/10/9 11:00', '2009/10/9 15:00', '2009/10/9 19:00', '2009/10/9 21:00', '2009/10/9 23:00', '2009/10/10 3:00', '2009/10/10 5:00', '2009/10/10 7:00', '2009/10/10 11:00', '2009/10/10 15:00', '2009/10/10 19:00', '2009/10/10 21:00', '2009/10/10 23:00', '2009/10/11 3:00', '2009/10/11 5:00', '2009/10/11 7:00', '2009/10/11 11:00', '2009/10/11 15:00', '2009/10/11 19:00', '2009/10/11 21:00', '2009/10/11 23:00', '2009/10/12 3:00', '2009/10/12 5:00', '2009/10/12 7:00', '2009/10/12 11:00', '2009/10/12 15:00', '2009/10/12 19:00', '2009/10/12 21:00', '2009/10/12 23:00', '2009/10/13 3:00', '2009/10/13 5:00', '2009/10/13 7:00', '2009/10/13 11:00', '2009/10/13 15:00', '2009/10/13 19:00', '2009/10/13 21:00', '2009/10/13 23:00', '2009/10/14 3:00', '2009/10/14 5:00', '2009/10/14 7:00', '2009/10/14 11:00', '2009/10/14 15:00', '2009/10/14 19:00', '2009/10/14 21:00', '2009/10/14 23:00', '2009/10/15 3:00', '2009/10/15 5:00', '2009/10/15 7:00', '2009/10/15 11:00', '2009/10/15 15:00', '2009/10/15 19:00', '2009/10/15 21:00', '2009/10/15 23:00', '2009/10/16 3:00', '2009/10/16 5:00', '2009/10/16 7:00', '2009/10/16 11:00', '2009/10/16 15:00', '2009/10/16 19:00', '2009/10/16 21:00', '2009/10/16 23:00', '2009/10/17 3:00', '2009/10/17 5:00', '2009/10/17 7:00', '2009/10/17 11:00', '2009/10/17 15:00', '2009/10/17 19:00', '2009/10/17 21:00', '2009/10/17 23:00', '2009/10/18 3:00', '2009/10/18 5:00', '2009/10/18 7:00']
Data Manipulation
df = pd.DataFrame({'Timestamp': timeData})
df["Timestamp"] = pd.to_datetime(df["Timestamp"], format="%Y/%m/%d %H:%M")
df['hours'] = df["Timestamp"].dt.strftime('%I%p').str.lower().str.lstrip('0')
df['days'] = df["Timestamp"].dt.day_name()
df = pd.crosstab(df['days'], df['hours']).reindex(index=df['days'].unique(), columns=df['hours'].unique())
df.reset_index(inplace=True)
df_melt = df.melt(id_vars='days', value_vars=df.columns.to_list())
df_melt.head()
days hours value
0 Friday 5am 18
1 Saturday5am 17
2 Sunday 5am 19
3 Monday 5am 18
4 Tuesday 5am 16
Adopted plotly implementation from
How can I customize/style the above plot as below using plotly-python:
CodePudding user response:
- you can use ploty express to generate sub-plots for each of the days
- have used pandas categorical functionality to get sort order correct first
- figure created by plotly express requires touch ups
- remove annotations
- only part of yaxes config is wanted
- xaxes need to be updated to show for each sub-plot
- some touch ups to layout
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
# fmt: off
timeData = ['2009/6/12 5:00', '2009/6/12 7:00', '2009/6/12 9:00', '2009/6/12 13:00', '2009/6/12 15:00', '2009/6/12 17:00', '2009/6/12 21:00', '2009/6/13 1:00', '2009/6/13 5:00', '2009/6/13 7:00', '2009/6/13 9:00', '2009/6/13 13:00', '2009/6/13 15:00', '2009/6/13 17:00', '2009/6/13 21:00', '2009/6/14 1:00', '2009/6/14 5:00', '2009/6/14 7:00', '2009/6/14 9:00', '2009/6/14 13:00', '2009/6/14 15:00', '2009/6/14 17:00', '2009/6/14 21:00', '2009/6/15 1:00', '2009/6/15 5:00', '2009/6/15 7:00', '2009/6/15 9:00', '2009/6/15 13:00', '2009/6/15 15:00', '2009/6/15 17:00', '2009/6/15 21:00', '2009/6/16 1:00', '2009/6/16 5:00', '2009/6/16 7:00', '2009/6/16 9:00', '2009/6/16 13:00', '2009/6/16 15:00', '2009/6/16 17:00', '2009/6/16 21:00', '2009/6/17 1:00', '2009/6/17 5:00', '2009/6/17 7:00', '2009/6/17 9:00', '2009/6/17 13:00', '2009/6/17 15:00', '2009/6/17 17:00', '2009/6/17 21:00', '2009/6/18 1:00', '2009/6/18 5:00', '2009/6/18 7:00', '2009/6/18 9:00', '2009/6/18 13:00', '2009/6/18 15:00', '2009/6/18 17:00', '2009/6/18 21:00', '2009/6/19 1:00', '2009/6/19 5:00', '2009/6/19 7:00', '2009/6/19 9:00', '2009/6/19 13:00', '2009/6/19 15:00', '2009/6/19 17:00', '2009/6/19 21:00', '2009/6/20 1:00', '2009/6/20 5:00', '2009/6/20 7:00', '2009/6/20 9:00', '2009/6/20 13:00', '2009/6/20 15:00', '2009/6/20 17:00', '2009/6/20 21:00', '2009/6/21 1:00', '2009/6/21 5:00', '2009/6/21 7:00', '2009/6/21 9:00', '2009/6/21 13:00', '2009/6/21 15:00', '2009/6/21 17:00', '2009/6/21 21:00', '2009/6/22 1:00', '2009/6/22 5:00', '2009/6/22 7:00', '2009/6/22 9:00', '2009/6/22 13:00', '2009/6/22 15:00', '2009/6/22 17:00', '2009/6/22 21:00', '2009/6/23 1:00', '2009/6/23 7:00', '2009/6/23 9:00', '2009/6/23 11:00', '2009/6/23 15:00', '2009/6/23 17:00', '2009/6/23 19:00', '2009/6/23 23:00', '2009/6/24 5:00', '2009/6/24 9:00', '2009/6/24 11:00', '2009/6/24 13:00', '2009/6/24 17:00', '2009/6/24 19:00', '2009/6/24 21:00', '2009/6/25 1:00', '2009/6/25 7:00', '2009/6/25 11:00', '2009/6/25 13:00', '2009/6/25 15:00', '2009/6/25 19:00', '2009/6/25 21:00', '2009/6/25 23:00', '2009/6/27 5:00', '2009/6/27 9:00', '2009/6/27 13:00', '2009/6/27 15:00', '2009/6/27 17:00', '2009/6/27 21:00', '2009/6/27 23:00', '2009/6/28 1:00', '2009/6/28 5:00', '2009/6/28 9:00', '2009/6/28 13:00', '2009/6/28 15:00', '2009/6/28 17:00', '2009/6/28 21:00', '2009/6/28 23:00', '2009/6/29 1:00', '2009/6/29 5:00', '2009/6/29 9:00', '2009/6/29 13:00', '2009/6/29 15:00', '2009/6/29 17:00', '2009/6/29 21:00', '2009/6/29 23:00', '2009/6/30 1:00', '2009/6/30 5:00', '2009/6/30 9:00', '2009/6/30 13:00', '2009/6/30 15:00', '2009/6/30 17:00', '2009/6/30 21:00', '2009/6/30 23:00', '2009/7/2 1:00', '2009/7/2 5:00', '2009/7/2 9:00', '2009/7/2 13:00', '2009/7/2 15:00', '2009/7/2 17:00', '2009/7/2 21:00', '2009/7/2 23:00', '2009/7/3 1:00', '2009/7/3 5:00', '2009/7/3 9:00', '2009/7/3 13:00', '2009/7/3 15:00', '2009/7/3 17:00', '2009/7/3 21:00', '2009/7/3 23:00', '2009/7/5 1:00', '2009/7/5 5:00', '2009/7/5 9:00', '2009/7/5 13:00', '2009/7/5 15:00', '2009/7/5 17:00', '2009/7/5 21:00', '2009/7/5 23:00', '2009/7/6 1:00', '2009/7/6 5:00', '2009/7/6 9:00', '2009/7/6 13:00', '2009/7/6 15:00', '2009/7/6 17:00', '2009/7/6 21:00', '2009/7/6 23:00', '2009/7/7 1:00', '2009/7/7 5:00', '2009/7/7 9:00', '2009/7/7 13:00', '2009/7/7 15:00', '2009/7/7 17:00', '2009/7/7 21:00', '2009/7/7 23:00', '2009/7/8 1:00', '2009/7/8 5:00', '2009/7/8 9:00', '2009/7/8 13:00', '2009/7/8 15:00', '2009/7/8 17:00', '2009/7/8 21:00', '2009/7/8 23:00', '2009/7/9 1:00', '2009/7/9 5:00', '2009/7/9 9:00', '2009/7/9 13:00', '2009/7/9 15:00', '2009/7/9 17:00', '2009/7/9 21:00', '2009/7/9 23:00', '2009/7/10 1:00', '2009/7/10 5:00', '2009/7/10 9:00', '2009/7/10 13:00', '2009/7/10 15:00', '2009/7/10 17:00', '2009/7/10 21:00', '2009/7/10 23:00', '2009/7/11 1:00', '2009/7/11 5:00', '2009/7/11 9:00', '2009/7/11 13:00', '2009/7/11 15:00', '2009/7/11 17:00', '2009/7/11 21:00', '2009/7/11 23:00', '2009/7/12 1:00', '2009/7/12 5:00', '2009/7/12 9:00', '2009/7/12 13:00', '2009/7/12 15:00', '2009/7/12 17:00', '2009/7/12 21:00', '2009/7/12 23:00', '2009/7/13 1:00', '2009/7/13 5:00', '2009/7/13 9:00', '2009/7/13 13:00', '2009/7/13 15:00', '2009/7/13 17:00', '2009/7/13 21:00', '2009/7/13 23:00', '2009/7/14 1:00', '2009/7/14 5:00', '2009/7/14 9:00', '2009/7/14 13:00', '2009/7/14 15:00', '2009/7/14 17:00', '2009/7/14 21:00', '2009/7/14 23:00', '2009/7/15 1:00', '2009/7/15 5:00', '2009/7/15 9:00', '2009/7/15 13:00', '2009/7/15 15:00', '2009/7/15 17:00', '2009/7/15 21:00', '2009/7/15 23:00', '2009/7/16 1:00', '2009/7/16 5:00', '2009/7/16 9:00', '2009/7/16 13:00', '2009/7/16 15:00', '2009/7/16 17:00', '2009/7/16 21:00', '2009/7/16 23:00', '2009/7/17 1:00', '2009/7/17 5:00', '2009/7/17 9:00', '2009/7/17 13:00', '2009/7/17 15:00', '2009/7/17 17:00', '2009/7/17 21:00', '2009/7/17 23:00', '2009/7/18 1:00', '2009/7/18 5:00', '2009/7/18 9:00', '2009/7/18 13:00', '2009/7/18 15:00', '2009/7/18 17:00', '2009/7/18 21:00', '2009/7/18 23:00', '2009/7/19 1:00', '2009/7/19 5:00', '2009/7/19 9:00', '2009/7/19 13:00', '2009/7/19 15:00', '2009/7/19 17:00', '2009/7/19 21:00', '2009/7/19 23:00', '2009/7/20 1:00', '2009/7/20 5:00', '2009/7/20 9:00', '2009/7/20 13:00', '2009/7/20 15:00', '2009/7/20 17:00', '2009/7/20 21:00', '2009/7/20 23:00', '2009/7/21 1:00', '2009/7/21 6:00', '2009/7/21 10:00', '2009/7/21 14:00', '2009/7/21 16:00', '2009/7/21 18:00', '2009/7/21 22:00', '2009/7/22 0:00', '2009/7/22 3:00', '2009/7/22 7:00', '2009/7/22 11:00', '2009/7/22 15:00', '2009/7/22 17:00', '2009/7/22 19:00', '2009/7/22 23:00', '2009/7/23 1:00', '2009/7/23 4:00', '2009/7/23 8:00', '2009/7/23 12:00', '2009/7/23 16:00', '2009/7/23 18:00', '2009/7/23 20:00', '2009/7/24 0:00', '2009/7/24 3:00', '2009/7/24 5:00', '2009/7/24 9:00', '2009/7/24 13:00', '2009/7/24 17:00', '2009/7/24 19:00', '2009/7/24 21:00', '2009/7/25 1:00', '2009/7/25 4:00', '2009/7/25 6:00', '2009/7/25 10:00', '2009/7/25 14:00', '2009/7/25 18:00', '2009/7/25 20:00', '2009/7/25 22:00', '2009/7/26 3:00', '2009/7/26 5:00', '2009/7/26 7:00', '2009/7/26 11:00', '2009/7/26 15:00', '2009/7/26 19:00', '2009/7/26 21:00', '2009/7/26 23:00', '2009/7/27 3:00', '2009/7/27 5:00', '2009/7/27 7:00', '2009/7/27 11:00', '2009/7/27 15:00', '2009/7/27 19:00', '2009/7/27 21:00', '2009/7/27 23:00', '2009/7/28 3:00', '2009/7/28 5:00', '2009/7/28 7:00', '2009/7/28 11:00', '2009/7/28 15:00', '2009/7/28 19:00', '2009/7/28 21:00', '2009/7/28 23:00', '2009/7/29 3:00', '2009/7/29 5:00', '2009/7/29 7:00', '2009/7/29 11:00', '2009/7/29 15:00', '2009/7/29 19:00', '2009/7/29 21:00', '2009/7/29 23:00', '2009/7/30 3:00', '2009/7/30 5:00', '2009/7/30 7:00', '2009/7/30 11:00', '2009/7/30 15:00', '2009/7/30 19:00', '2009/7/30 21:00', '2009/7/30 23:00', '2009/7/31 3:00', '2009/7/31 5:00', '2009/7/31 7:00', '2009/7/31 11:00', '2009/7/31 15:00', '2009/7/31 19:00', '2009/7/31 21:00', '2009/7/31 23:00', '2009/8/1 3:00', '2009/8/1 5:00', '2009/8/1 7:00', '2009/8/1 11:00', '2009/8/1 15:00', '2009/8/1 19:00', '2009/8/1 21:00', '2009/8/1 23:00', '2009/8/2 3:00', '2009/8/2 5:00', '2009/8/2 7:00', '2009/8/2 11:00', '2009/8/2 15:00', '2009/8/2 19:00', '2009/8/2 21:00', '2009/8/2 23:00', '2009/8/3 3:00', '2009/8/3 5:00', '2009/8/3 7:00', '2009/8/3 11:00', '2009/8/3 15:00', '2009/8/3 19:00', '2009/8/3 21:00', '2009/8/3 23:00', '2009/8/4 3:00', '2009/8/4 5:00', '2009/8/4 7:00', '2009/8/4 11:00', '2009/8/4 15:00', '2009/8/4 19:00', '2009/8/4 21:00', '2009/8/4 23:00', '2009/8/5 3:00', '2009/8/5 5:00', '2009/8/5 7:00', '2009/8/5 11:00', '2009/8/5 15:00', '2009/8/5 19:00', '2009/8/5 21:00', '2009/8/5 23:00', '2009/8/6 3:00', '2009/8/6 5:00', '2009/8/6 7:00', '2009/8/6 11:00', '2009/8/6 15:00', '2009/8/6 19:00', '2009/8/6 21:00', '2009/8/6 23:00', '2009/8/7 3:00', '2009/8/7 5:00', '2009/8/7 7:00', '2009/8/7 11:00', '2009/8/7 15:00', '2009/8/7 19:00', '2009/8/7 21:00', '2009/8/7 23:00', '2009/8/8 3:00', '2009/8/8 5:00', '2009/8/8 7:00', '2009/8/8 11:00', '2009/8/8 15:00', '2009/8/8 19:00', '2009/8/8 21:00', '2009/8/8 23:00', '2009/8/9 3:00', '2009/8/9 5:00', '2009/8/9 7:00', '2009/8/9 11:00', '2009/8/9 15:00', '2009/8/9 19:00', '2009/8/9 21:00', '2009/8/9 23:00', '2009/8/10 3:00', '2009/8/10 5:00', '2009/8/10 7:00', '2009/8/10 11:00', '2009/8/10 15:00', '2009/8/10 19:00', '2009/8/10 21:00', '2009/8/10 23:00', '2009/8/11 3:00', '2009/8/11 5:00', '2009/8/11 7:00', '2009/8/11 11:00', '2009/8/11 15:00', '2009/8/11 19:00', '2009/8/11 21:00', '2009/8/11 23:00', '2009/8/12 3:00', '2009/8/12 5:00', '2009/8/12 7:00', '2009/8/12 11:00', '2009/8/12 15:00', '2009/8/12 19:00', '2009/8/12 21:00', '2009/8/12 23:00', '2009/8/13 3:00', '2009/8/13 5:00', '2009/8/13 7:00', '2009/8/13 11:00', '2009/8/13 15:00', '2009/8/13 19:00', '2009/8/13 21:00', '2009/8/13 23:00', '2009/8/14 3:00', '2009/8/14 5:00', '2009/8/14 7:00', '2009/8/14 11:00', '2009/8/14 15:00', '2009/8/14 19:00', '2009/8/14 21:00', '2009/8/14 23:00', '2009/8/15 3:00', '2009/8/15 5:00', '2009/8/15 7:00', '2009/8/15 11:00', '2009/8/15 15:00', '2009/8/15 19:00', '2009/8/15 21:00', '2009/8/15 23:00', '2009/8/16 3:00', '2009/8/16 5:00', '2009/8/16 7:00', '2009/8/16 11:00', '2009/8/16 15:00', '2009/8/16 19:00', '2009/8/16 21:00', '2009/8/16 23:00', '2009/8/17 3:00', '2009/8/17 5:00', '2009/8/17 7:00', '2009/8/17 11:00', '2009/8/17 15:00', '2009/8/17 19:00', '2009/8/17 21:00', '2009/8/17 23:00', '2009/8/18 3:00', '2009/8/18 5:00', '2009/8/18 7:00', '2009/8/18 11:00', '2009/8/18 15:00', '2009/8/18 19:00', '2009/8/18 21:00', '2009/8/18 23:00', '2009/8/19 3:00', '2009/8/19 5:00', '2009/8/19 7:00', '2009/8/19 11:00', '2009/8/19 15:00', '2009/8/19 19:00', '2009/8/19 21:00', '2009/8/19 23:00', '2009/8/20 3:00', '2009/8/20 5:00', '2009/8/20 7:00', '2009/8/20 11:00', '2009/8/20 15:00', '2009/8/20 19:00', '2009/8/20 21:00', '2009/8/20 23:00', '2009/8/21 3:00', '2009/8/21 5:00', '2009/8/21 7:00', '2009/8/21 11:00', '2009/8/21 15:00', '2009/8/21 19:00', '2009/8/21 21:00', '2009/8/21 23:00', '2009/8/22 3:00', '2009/8/22 5:00', '2009/8/22 7:00', '2009/8/22 11:00', '2009/8/22 15:00', '2009/8/22 19:00', '2009/8/22 21:00', '2009/8/22 23:00', '2009/8/23 3:00', '2009/8/23 5:00', '2009/8/23 7:00', '2009/8/23 11:00', '2009/8/23 15:00', '2009/8/23 19:00', '2009/8/23 21:00', '2009/8/23 23:00', '2009/8/24 3:00', '2009/8/24 5:00', '2009/8/24 7:00', '2009/8/24 11:00', '2009/8/24 15:00', '2009/8/24 19:00', '2009/8/24 21:00', '2009/8/24 23:00', '2009/8/25 3:00', '2009/8/25 5:00', '2009/8/25 7:00', '2009/8/25 11:00', '2009/8/25 15:00', '2009/8/25 19:00', '2009/8/25 21:00', '2009/8/25 23:00', '2009/8/26 3:00', '2009/8/26 5:00', '2009/8/26 7:00', '2009/8/26 11:00', '2009/8/26 15:00', '2009/8/26 19:00', '2009/8/26 21:00', '2009/8/26 23:00', '2009/8/27 3:00', '2009/8/27 5:00', '2009/8/27 7:00', '2009/8/27 11:00', '2009/8/27 15:00', '2009/8/27 19:00', '2009/8/27 21:00', '2009/8/27 23:00', '2009/8/28 3:00', '2009/8/28 5:00', '2009/8/28 7:00', '2009/8/28 11:00', '2009/8/28 15:00', '2009/8/28 19:00', '2009/8/28 21:00', '2009/8/28 23:00', '2009/8/29 3:00', '2009/8/29 5:00', '2009/8/29 7:00', '2009/8/29 11:00', '2009/8/29 15:00', '2009/8/29 19:00', '2009/8/29 21:00', '2009/8/29 23:00', '2009/8/30 3:00', '2009/8/30 5:00', '2009/8/30 7:00', '2009/8/30 11:00', '2009/8/30 15:00', '2009/8/30 19:00', '2009/8/30 21:00', '2009/8/30 23:00', '2009/8/31 3:00', '2009/8/31 5:00', '2009/8/31 7:00', '2009/8/31 11:00', '2009/8/31 15:00', '2009/8/31 19:00', '2009/8/31 21:00', '2009/8/31 23:00', '2009/9/1 3:00', '2009/9/1 5:00', '2009/9/1 7:00', '2009/9/1 11:00', '2009/9/1 15:00', '2009/9/1 19:00', '2009/9/1 21:00', '2009/9/1 23:00', '2009/9/2 3:00', '2009/9/2 5:00', '2009/9/2 7:00', '2009/9/2 11:00', '2009/9/2 15:00', '2009/9/2 19:00', '2009/9/2 21:00', '2009/9/2 23:00', '2009/9/3 3:00', '2009/9/3 5:00', '2009/9/3 7:00', '2009/9/3 11:00', '2009/9/3 15:00', '2009/9/3 19:00', '2009/9/3 21:00', '2009/9/3 23:00', '2009/9/4 3:00', '2009/9/4 5:00', '2009/9/4 7:00', '2009/9/4 11:00', '2009/9/4 15:00', '2009/9/4 19:00', '2009/9/4 21:00', '2009/9/4 23:00', '2009/9/5 3:00', '2009/9/5 5:00', '2009/9/5 7:00', '2009/9/5 11:00', '2009/9/5 15:00', '2009/9/5 19:00', '2009/9/5 21:00', '2009/9/5 23:00', '2009/9/6 3:00', '2009/9/6 5:00', '2009/9/6 7:00', '2009/9/6 11:00', '2009/9/6 15:00', '2009/9/6 19:00', '2009/9/6 21:00', '2009/9/6 23:00', '2009/9/7 3:00', '2009/9/7 5:00', '2009/9/7 7:00', '2009/9/7 11:00', '2009/9/7 15:00', '2009/9/7 19:00', '2009/9/7 21:00', '2009/9/7 23:00', '2009/9/8 3:00', '2009/9/8 5:00', '2009/9/8 7:00', '2009/9/8 11:00', '2009/9/8 15:00', '2009/9/8 19:00', '2009/9/8 21:00', '2009/9/8 23:00', '2009/9/9 3:00', '2009/9/9 5:00', '2009/9/9 7:00', '2009/9/9 11:00', '2009/9/9 15:00', '2009/9/9 19:00', '2009/9/9 21:00', '2009/9/9 23:00', '2009/9/10 3:00', '2009/9/10 5:00', '2009/9/10 7:00', '2009/9/10 11:00', '2009/9/10 15:00', '2009/9/10 19:00', '2009/9/10 21:00', '2009/9/10 23:00', '2009/9/11 3:00', '2009/9/11 5:00', '2009/9/11 7:00', '2009/9/11 11:00', '2009/9/11 15:00', '2009/9/11 19:00', '2009/9/11 21:00', '2009/9/11 23:00', '2009/9/12 3:00', '2009/9/12 5:00', '2009/9/12 7:00', '2009/9/12 11:00', '2009/9/12 15:00', '2009/9/12 19:00', '2009/9/12 21:00', '2009/9/12 23:00', '2009/9/13 3:00', '2009/9/13 5:00', '2009/9/13 7:00', '2009/9/13 11:00', '2009/9/13 15:00', '2009/9/13 19:00', '2009/9/13 21:00', '2009/9/13 23:00', '2009/9/14 3:00', '2009/9/14 5:00', '2009/9/14 7:00', '2009/9/14 11:00', '2009/9/14 15:00', '2009/9/14 19:00', '2009/9/14 21:00', '2009/9/14 23:00', '2009/9/15 3:00', '2009/9/15 5:00', '2009/9/15 7:00', '2009/9/15 11:00', '2009/9/15 15:00', '2009/9/15 19:00', '2009/9/15 21:00', '2009/9/15 23:00', '2009/9/16 3:00', '2009/9/16 5:00', '2009/9/16 7:00', '2009/9/16 11:00', '2009/9/16 15:00', '2009/9/16 19:00', '2009/9/16 21:00', '2009/9/16 23:00', '2009/9/17 3:00', '2009/9/17 5:00', '2009/9/17 7:00', '2009/9/17 11:00', '2009/9/17 15:00', '2009/9/17 19:00', '2009/9/17 21:00', '2009/9/17 23:00', '2009/9/18 3:00', '2009/9/18 5:00', '2009/9/18 7:00', '2009/9/18 11:00', '2009/9/18 15:00', '2009/9/18 19:00', '2009/9/18 21:00', '2009/9/18 23:00', '2009/9/19 3:00', '2009/9/19 5:00', '2009/9/19 7:00', '2009/9/19 11:00', '2009/9/19 15:00', '2009/9/19 19:00', '2009/9/19 21:00', '2009/9/19 23:00', '2009/9/20 3:00', '2009/9/20 5:00', '2009/9/20 7:00', '2009/9/20 11:00', '2009/9/20 15:00', '2009/9/20 19:00', '2009/9/20 21:00', '2009/9/20 23:00', '2009/9/21 3:00', '2009/9/21 5:00', '2009/9/21 7:00', '2009/9/21 11:00', '2009/9/21 15:00', '2009/9/21 19:00', '2009/9/21 21:00', '2009/9/21 23:00', '2009/9/22 3:00', '2009/9/22 5:00', '2009/9/22 7:00', '2009/9/22 11:00', '2009/9/22 15:00', '2009/9/22 19:00', '2009/9/22 21:00', '2009/9/22 23:00', '2009/9/23 3:00', '2009/9/23 5:00', '2009/9/23 7:00', '2009/9/23 11:00', '2009/9/23 15:00', '2009/9/23 19:00', '2009/9/23 21:00', '2009/9/23 23:00', '2009/9/24 3:00', '2009/9/24 5:00', '2009/9/24 7:00', '2009/9/24 11:00', '2009/9/24 15:00', '2009/9/24 19:00', '2009/9/24 21:00', '2009/9/24 23:00', '2009/9/25 3:00', '2009/9/25 5:00', '2009/9/25 7:00', '2009/9/25 11:00', '2009/9/25 15:00', '2009/9/25 19:00', '2009/9/25 21:00', '2009/9/25 23:00', '2009/9/26 3:00', '2009/9/26 5:00', '2009/9/26 7:00', '2009/9/26 11:00', '2009/9/26 15:00', '2009/9/26 19:00', '2009/9/26 21:00', '2009/9/26 23:00', '2009/9/27 3:00', '2009/9/27 5:00', '2009/9/27 7:00', '2009/9/27 11:00', '2009/9/27 15:00', '2009/9/27 19:00', '2009/9/27 21:00', '2009/9/27 23:00', '2009/9/28 3:00', '2009/9/28 5:00', '2009/9/28 7:00', '2009/9/28 11:00', '2009/9/28 15:00', '2009/9/28 19:00', '2009/9/28 21:00', '2009/9/28 23:00', '2009/9/29 3:00', '2009/9/29 5:00', '2009/9/29 7:00', '2009/9/29 11:00', '2009/9/29 15:00', '2009/9/29 19:00', '2009/9/29 21:00', '2009/9/29 23:00', '2009/9/30 3:00', '2009/9/30 5:00', '2009/9/30 7:00', '2009/9/30 11:00', '2009/9/30 15:00', '2009/9/30 19:00', '2009/9/30 21:00', '2009/9/30 23:00', '2009/10/1 3:00', '2009/10/1 5:00', '2009/10/1 7:00', '2009/10/1 11:00', '2009/10/1 15:00', '2009/10/1 19:00', '2009/10/1 21:00', '2009/10/1 23:00', '2009/10/2 3:00', '2009/10/2 5:00', '2009/10/2 7:00', '2009/10/2 11:00', '2009/10/2 15:00', '2009/10/2 19:00', '2009/10/2 21:00', '2009/10/2 23:00', '2009/10/3 3:00', '2009/10/3 5:00', '2009/10/3 7:00', '2009/10/3 11:00', '2009/10/3 15:00', '2009/10/3 19:00', '2009/10/3 21:00', '2009/10/3 23:00', '2009/10/4 3:00', '2009/10/4 5:00', '2009/10/4 7:00', '2009/10/4 11:00', '2009/10/4 15:00', '2009/10/4 19:00', '2009/10/4 21:00', '2009/10/4 23:00', '2009/10/5 3:00', '2009/10/5 5:00', '2009/10/5 7:00', '2009/10/5 11:00', '2009/10/5 15:00', '2009/10/5 19:00', '2009/10/5 21:00', '2009/10/5 23:00', '2009/10/6 3:00', '2009/10/6 5:00', '2009/10/6 7:00', '2009/10/6 11:00', '2009/10/6 15:00', '2009/10/6 19:00', '2009/10/6 21:00', '2009/10/6 23:00', '2009/10/7 3:00', '2009/10/7 5:00', '2009/10/7 7:00', '2009/10/7 11:00', '2009/10/7 15:00', '2009/10/7 19:00', '2009/10/7 21:00', '2009/10/7 23:00', '2009/10/8 3:00', '2009/10/8 5:00', '2009/10/8 7:00', '2009/10/8 11:00', '2009/10/8 15:00', '2009/10/8 19:00', '2009/10/8 21:00', '2009/10/8 23:00', '2009/10/9 3:00', '2009/10/9 5:00', '2009/10/9 7:00', '2009/10/9 11:00', '2009/10/9 15:00', '2009/10/9 19:00', '2009/10/9 21:00', '2009/10/9 23:00', '2009/10/10 3:00', '2009/10/10 5:00', '2009/10/10 7:00', '2009/10/10 11:00', '2009/10/10 15:00', '2009/10/10 19:00', '2009/10/10 21:00', '2009/10/10 23:00', '2009/10/11 3:00', '2009/10/11 5:00', '2009/10/11 7:00', '2009/10/11 11:00', '2009/10/11 15:00', '2009/10/11 19:00', '2009/10/11 21:00', '2009/10/11 23:00', '2009/10/12 3:00', '2009/10/12 5:00', '2009/10/12 7:00', '2009/10/12 11:00', '2009/10/12 15:00', '2009/10/12 19:00', '2009/10/12 21:00', '2009/10/12 23:00', '2009/10/13 3:00', '2009/10/13 5:00', '2009/10/13 7:00', '2009/10/13 11:00', '2009/10/13 15:00', '2009/10/13 19:00', '2009/10/13 21:00', '2009/10/13 23:00', '2009/10/14 3:00', '2009/10/14 5:00', '2009/10/14 7:00', '2009/10/14 11:00', '2009/10/14 15:00', '2009/10/14 19:00', '2009/10/14 21:00', '2009/10/14 23:00', '2009/10/15 3:00', '2009/10/15 5:00', '2009/10/15 7:00', '2009/10/15 11:00', '2009/10/15 15:00', '2009/10/15 19:00', '2009/10/15 21:00', '2009/10/15 23:00', '2009/10/16 3:00', '2009/10/16 5:00', '2009/10/16 7:00', '2009/10/16 11:00', '2009/10/16 15:00', '2009/10/16 19:00', '2009/10/16 21:00', '2009/10/16 23:00', '2009/10/17 3:00', '2009/10/17 5:00', '2009/10/17 7:00', '2009/10/17 11:00', '2009/10/17 15:00', '2009/10/17 19:00', '2009/10/17 21:00', '2009/10/17 23:00', '2009/10/18 3:00', '2009/10/18 5:00', '2009/10/18 7:00']
# fmt: on
df = pd.DataFrame({"Timestamp": timeData})
df["Timestamp"] = pd.to_datetime(df["Timestamp"], format="%Y/%m/%d %H:%M")
df["hours"] = df["Timestamp"].dt.strftime("%I%p").str.lower().str.lstrip("0")
df["days"] = df["Timestamp"].dt.day_name()
df = pd.crosstab(df["days"], df["hours"]).reindex(
index=df["days"].unique(), columns=df["hours"].unique()
)
df.reset_index(inplace=True)
df_melt = df.melt(id_vars="days", value_vars=df.columns.to_list())
# use pandas catgorical capability to sort data
df_melt["days"] = pd.Categorical(
df_melt["days"],
categories=pd.date_range("3-jan-2022", periods=7).strftime("%A").tolist(),
ordered=True,
)
df_melt["hours"] = pd.Categorical(
df_melt["hours"],
categories=pd.date_range("1-jan-2022", freq="H", periods=24)
.strftime("%I%p")
.str.lower()
.str.lstrip("0"),
ordered=True,
)
df_melt = df_melt.sort_values(["days", "hours"])
# generate traces and axes of sub-plots
fig = px.scatter(
df_melt, color="days", y="days", x="hours", size="value", facet_row="days"
)
# remove and restructure unwanted parts of plotly express figure
fig2 = go.Figure(
data=fig.data,
layout={
k: v
if k[0:5] != "yaxis"
else {kk: vv for kk, vv in v.items() if kk in ["anchor", "domain"]}
for k, v in fig.to_dict()["layout"].items()
if k not in ["template", "annotations"]
},
)
# final touch up
fig2.update_layout(
showlegend=False,
plot_bgcolor="rgba(0, 0, 0, 0)",
autosize=False,
width=900,
height=500,
margin=dict(l=0, r=0, b=0, t=0, pad=0),
).update_xaxes(
matches=None,
title_text="",
showticklabels=True,
dtick=3,
showline=True,
linecolor="black",
)