Our booth in the laboratory gives this log:
1533288841;34441818;03-08-2018;09:34:01;.tmp9;36.748970; 1533288842;34442968;03-08-2018;09:34:02;.tmp9;36.748970; 1533288844;34444019;03-08-2018;09:34:04;.tmp9;36.748970; 1533288845;34445029;03-08-2018;09:34:05;.tmp9;36.748970; 1533288846;34446025;03-08-2018;09:34:06;.tmp9;36.748970; 1533288847;34447064;03-08-2018;09:34:07;.tmp9;36.748970; 1533288848;34448072;03-08-2018;09:34:08;.tmp9;36.748970; 1533288849;34449120;03-08-2018;09:34:09;.tmp9;36.748970; 1533288850;34450143;03-08-2018;09:34:10;.tmp9;36.773521; We are trying to plot a temperature over time.
import pandas as pd import matplotlib.pyplot as plt plt.style.use('ggplot') plt.rcParams['figure.figsize'] = (10, 5) fn = r'C:\\NET\\Log\\tmp92.trd' df = pd.read_csv(fn, sep=';') df.columns = ['atime', 'ctime', 'date', 'time', 'tag' , 'tmp' , 'NaN'] df['date'] = df.date.astype('datetime64[ns]') df['time'] = df.time.astype('datetime64[ns]') df.dropna(axis = 1, thresh=3) df.drop(df.columns[[0, 1, 4]], axis=1, inplace=True) plt.xlabel('Время') plt.ylabel('Температура (С)') plt.title('Температура на выходе активатора') plt.grid(True) df.plot(x='time', y='tmp') plt.show() It seems to have happened, but we can not defeat the lower axis. I wanted to see the time there, and not 08-06-10, it is clear that the joint in the format date + time. - how to make only time ??
