How to plot a scatter plot on a single y-tick

Viewed 495

enter image description here

I'm just curious to know if there is any python package that can be used to plot a Scatter plot on a single axis. I'm open to new ideas and approaches and wanted to put some feelers out before diving into getting started

Can it be possible to plot the above plot with Python if YES, Which package would be used to plot the above plot? Can anybody shed some light on plotting the above plot with Python? I would be happy to receive any leads on it from you.

Exampleset:

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']
import pandas as pd

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

hours   5am 7am 9am 1pm 3pm 5pm 9pm 1am 11am    7pm 11pm    6am 10am    2pm 4pm 6pm 10pm    12am    3am 4am 8am 12pm    8pm
days                                                                                            
Friday  18  14  6   6   17  6   18  4   12  13  15  0   0   0   0   0   0   1   13  0   0   0   0
Saturday    17  14  5   5   17  5   17  5   12  12  15  1   1   1   0   1   1   0   12  1   0   0   1
Sunday  19  15  6   6   18  6   18  6   12  12  16  0   0   0   0   0   0   0   13  0   0   0   0
Monday  18  14  6   6   18  6   18  6   12  12  16  0   0   0   0   0   0   0   12  0   0   0   0
Tuesday 16  14  5   4   17  5   16  6   13  13  16  1   1   1   1   1   1   0   12  0   0   0   0
Wednesday   16  14  4   4   16  5   16  3   14  14  15  0   0   0   0   0   0   1   13  0   0   0   0
Thursday    16  14  4   5   17  4   17  6   13  13  16  0   0   0   1   1   0   0   12  1   1   1   1
3 Answers

Here is an example of an approach using plotly. The data is converted to long format and the graph is drawn by creating a display order list for the x- and y-axes. If you want to restrict the time axis, you can extract the original data to the time period you need and draw it.

df_long = df.groupby(['days','hours']).count()
df_long.reset_index(inplace=True)
df_long.head()

    days    hours   Timestamp
0   Friday  11am    12
1   Friday  11pm    15
2   Friday  12am    1
3   Friday  1am     4
4   Friday  1pm     6


import plotly.express as px

order = {'hours':['5am', '6am', '7am', '8am', '9am', '10am', '11am', '12am',
 '1pm', '2pm', '3pm', '4pm', '5pm', '6pm', '7pm', '8pm', '9pm', '10pm', '11pm', '12pm',
 '1am', '2am', '3am', '4am']}
week_order = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']

fig = px.scatter(df_long,
                 x='hours',
                 y='days',
                 size='Timestamp',
                 color='days',
                 category_orders=order)

fig.update_yaxes(categoryarray=week_order)
fig.show()

enter image description here

Altair There is another graphing library, Altair. It has the advantage that the data can be used directly with pandas. See this page.

import altair as alt
from vega_datasets import data

df['count'] = 1
df['Timestamp'] = pd.to_datetime(df['Timestamp'])

alt.Chart(df).mark_circle().encode(
    x='hours(Timestamp):O',
    y='day(Timestamp):O',
    size='sum(count):Q'
)

enter image description here

  • Update: Why the black / gray color scheme. I look at SO in dark mode. The sample plot must be transparent, so it looks black / gray. I only realized that's not the case when I looked at the question on my phone, which isn't set to use SO dark mode. What needs to be changed, is obvious in the code, and I don't have time to change the answer.
  • Use seaborn.scatterplot
    • Adjust the bubble sizes with sizes=(50, 1000). Which gives 0 a size of 50 and the largest value a size of 1000. Change 50 to 0 to get 0 size for 0 value.
  • Using your sample dataframe, df, to the point before the .crosstab
    • hours should be on the index, as the index becomes the x-axis
  • Set the varis axis and figure parameters as commented in the code, to produce the desired plot
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

# beginning with your dataframe before doing the crosstab, create the crosstab as follows
ct = pd.crosstab(df.hours, df.days)

# the data is missing anything for 2am add that to ct as 0s
missing = pd.DataFrame({'Friday': [0], 'Monday': [0], 'Saturday': [0], 'Sunday': [0], 'Thursday': [0], 'Tuesday': [0], 'Wednesday': [0]}, index=['2am'])
ct = ct.append(missing)

# sorted column and axis values
hours = ['5am', '6am', '7am', '8am', '9am', '10am', '11am', '12am', '1pm', '2pm', '3pm', '4pm', '5pm', '6pm', '7pm', '8pm', '9pm', '10pm', '11pm', '12pm', '1am', '2am', '3am', '4am']
days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']

# colors for plots
colors = ['purple', 'lime', 'yellow', 'red', 'blue', 'green', 'orange']

# reorder the index and columns
ct = ct.loc[hours, days]

# create the figure
fig, axes = plt.subplots(nrows=7, figsize=(14, 7), facecolor='black', constrained_layout=1)

# iterate through days, axes, and colors
for col, ax, color in zip(days, axes, colors):
    # select data
    data = ct[col].reset_index()
    
    # plot
    sns.scatterplot(data=data, x='index', y=[0]*len(data), size=col, ax=ax, color=color, legend=False, ec='none', sizes=(50, 1000), palette='muted', alpha=0.5)

    # Hide the right and top spines
    ax.spines['right'].set_visible(False)
    ax.spines['top'].set_visible(False)

    # set the y-tick name
    ax.set_yticks([0])
    ax.set_yticklabels([col])

    # remove the x-axis label
    ax.set_xlabel('')

    # set the x margin
    ax.margins(x=0.02)

    # set the plot facecolor
    ax.set_facecolor('black')
    
    # set axis labels, ticklabels and tick colors
    ax.tick_params(colors='gray', which='both')

    # set spine color
    ax.spines['bottom'].set(color='gray')

enter image description here

display(ct)

      Sunday  Monday  Tuesday  Wednesday  Thursday  Friday  Saturday
5am       19      18       16         16        16      18        17
6am        0       0        1          0         0       0         1
7am       15      14       14         14        14      14        14
8am        0       0        0          0         1       0         0
9am        6       6        5          4         4       6         5
10am       0       0        1          0         0       0         1
11am      12      12       13         14        13      12        12
12am       0       0        0          1         0       1         0
1pm        6       6        4          4         5       6         5
2pm        0       0        1          0         0       0         1
3pm       18      18       17         16        17      17        17
4pm        0       0        1          0         1       0         0
5pm        6       6        5          5         4       6         5
6pm        0       0        1          0         1       0         1
7pm       12      12       13         14        13      13        12
8pm        0       0        0          0         1       0         1
9pm       18      18       16         16        17      18        17
10pm       0       0        1          0         0       0         1
11pm      16      16       16         15        16      15        15
12pm       0       0        0          0         1       0         0
1am        6       6        6          3         6       4         5
2am        0       0        0          0         0       0         0
3am       13      12       12         13        12      13        12
4am        0       0        0          0         1       0         1

Python, Numpy & Matplotlib


enter image description here


After ordering the data, it's as simple as plotting 7 scatter plots, taking care of turning off all the unwanted visual elements (left, top, right spines and y ticks & tick labels).

Just a word on the use of the default property cycle that is forcibly shared among the axes, so that each one is colored differently.

import numpy as np
import matplotlib.pyplot as plt

# Some constants that will be useful later (I find writing list of strings
# boring and error prone, I prefer to split a string of space separated items)
AMPM_TO_24 = dict(
    zip('12a 1a 2a 3a 4a 5a 6a 7a 8a 9a 10a 11a 12p 1p 2p 3p 4p 5p 6p 7p 8p 9p 10p 11p'.split(),
        '0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23'.split()))
DAYS_OW = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday'.split()

# I have slightly edited your data: ① shortened am/mp ② used commas
data = '''\
hour,     5a,7a,9a,1p,3p,5p,9p,1a,11a,7p,11p,6a,10a,2p,4p,6p,10p,12a,3a,4a,8a,12p,8p
Friday,   18,14, 6, 6,17, 6,18, 4, 12,13, 15, 0,  0, 0, 0, 0,  0,  1,13, 0, 0,  0, 0
Saturday, 17,14, 5, 5,17, 5,17, 5, 12,12, 15, 1,  1, 1, 0, 1,  1,  0,12, 1, 0,  0, 1
Sunday,   19,15, 6, 6,18, 6,18, 6, 12,12, 16, 0,  0, 0, 0, 0,  0,  0,13, 0, 0,  0, 0
Monday,   18,14, 6, 6,18, 6,18, 6, 12,12, 16, 0,  0, 0, 0, 0,  0,  0,12, 0, 0,  0, 0
Tuesday,  16,14, 5, 4,17, 5,16, 6, 13,13, 16, 1,  1, 1, 1, 1,  1,  0,12, 0, 0,  0, 0
Wednesday,16,14, 4, 4,16, 5,16, 3, 14,14, 15, 0,  0, 0, 0, 0,  0,  1,13, 0, 0,  0, 0
Thursday, 16,14, 4, 5,17, 4,17, 6, 13,13, 16, 0,  0, 0, 1, 1,  0,  0,12, 1, 1,  1, 1'''.split('\n')

# ① extract hours from 1st line, ② convert to 0÷24 and place in a  Numpy array
_, *hours = (h.strip() for h in data[0].split(','))
hours = np.array([AMPM_TO_24[h] for h in hours], dtype=int)
zero = np.zeros_like(hours)

# ① generator of list of items, ② convert data to dict, its values are Numpy arrays
csv = (line.split(',') for line in data[1:])
data = {dow:np.array(values, dtype=int) for dow, *values in csv}

################### PLOTTING STARTS HERE ################
# sharey=all because I want the same scale for all the circles
fig, axes = plt.subplots(7, figsize=(9, 6),
                         sharey='all', constrained_layout=1)
# prop_cycle is renewed for each Axes, we want a single instance for the figure
fig_prop_cycle = plt.rcParams['axes.prop_cycle']()

for ax, dow in zip(axes, DAYS_OW[::-1]):
#or ax, dow in zip(axes, data):  # alternative order of plots
    ax.scatter(hours, [0 for _ in hours], 4*data[dow]**2, **next(fig_prop_cycle), alpha=0.6)
    for x in 'left top right'.split():ax.spines[x].set_visible(False)
    ax.set_xticks(range(0,24,3)) ; ax.set_xlim((-1, 25))
    ax.set_xticks(range(25), minor=True)
    ax.set_yticks([]) ; ax.set_yticklabels([])
    ax.set_ylabel(dow, rotation=0, ha='right', va='center', fontsize=12, fontweight='bold')
plt.show()

Re previous versions, I didn't realize that sorting the values and later sorting the hours was a sort of no-op (see edit history).


Re: the ordering of the days.


Imo this type of graph tends to be read like a page of text, from top to bottom, contrary to a common plot where the ordinates are ordered from bottom to top, hence my idea, presented in a previous revision of this answer, where the days of week were presented in the order in which they are found in the data, from Friday to Thursday.

Related