I can only set the x axis limit to a certain date, but not with hours, minutes seconds. My code looks like this:
plt.figure()
plt.plot(data.date,sig,'b-')
plt.xlim([datetime.date(2022,4,27),datetime.date(2022,4,29)])
plt.ylim()
And my data frame looks like this:
date x y z bat
0 2022-04-27 11:07:39.721 -0.875 -0.143 0.516 NaN
1 2022-04-27 11:08:04.721 -0.875 -0.143 0.516 NaN
2 2022-04-27 11:08:29.721 -0.875 -0.143 0.484 NaN
3 2022-04-27 11:08:54.721 -0.875 -0.143 0.484 NaN
4 2022-04-27 11:09:19.721 -0.875 -0.143 0.484 NaN
I searched on the internet but I can only see examples of this xlimit with only a date, not with time. Does anyone know how I can add the time with it. for example the x limit should start at: '2022-04-27 11:07:39.721'
Kind regards,
Simon
