Matplotlib: xticks every 15 minutes, starting on the hour

后端 未结 2 1286
孤街浪徒
孤街浪徒 2020-12-10 15:38

I am trying to plot values of temperature against time with the time formatted as HH:MM. I am able to set the xticks to recur every 15 minutes but the first tick is at the f

2条回答
  •  遥遥无期
    2020-12-10 16:21

    You could tell the MinuteLocator to only use the minutes 0,15,30,45 using the byminute argument.

    xlocator = md.MinuteLocator(byminute=[0,15,30,45], interval = 1)
    

提交回复
热议问题