question: i have a series of datetime.time type data (a list or a pd.series, and i don't care about the date) as x-axis, and another series of data as y axis. then, how can i plot the the list of datetime.time as my x-axis with a range from (09:00 to 18:00) and step of 2 hours? e.g
import datetime
x = [datetime.time(hour=9,minute=0,second=0),datetime.time(hour=12,minute=3,second = 6),datetime.time(hour=14,minute=20,second=0)]
y=[1,2,3]
then how to plot the y value along with x as the x-axis with a step of 2 hours with a specified time range (e.g 08:00:00 - 18:00:00),the x-axis should be something like this: enter image description here
I was quite surprised that matplotlib does not offer api for such a simple and common situation.