I have this pandas dataframe and I would like to plot it by only showing the day, hour, min and secs.
As time, I have a Unix TimeStamp in ms and I convert it to the format you already see in the dataframe.
frm = mdates.DateFormatter('%Y-%m-%d %H:%M:%S')
df['startTime'] = pd.to_datetime((df['startTime']), unit='ms')
print(df)
plt.plot_date(df['startTime'], df['parameter.value'], linestyle='solid')
plt.gcf().autofmt_xdate()
plt.gca().xaxis.set_major_formatter(frm)
plt.show()
Although I format it with the DateFormatter, still the mins and the secs do not appear in the plot.
If the X axis is a string, the date/time format can be displayed without rounding.