Hello,
I have to generate a graphic from a .dat file in which the 2nd columns (which will be the x axis) is filled with different times of format HH:MM. The intervals between each time vary a lot (from 1 min to 7 min) and absolutely randomly.
I have tried :
Sorry for the short ending,I made a typing error and for a reason I cannot repaste the full Error message at once and it is really long (it took me more than ten minutes to write it all down befoere editing and then I lost it all because the editing time had passed)...
At the end I get :
I have to generate a graphic from a .dat file in which the 2nd columns (which will be the x axis) is filled with different times of format HH:MM. The intervals between each time vary a lot (from 1 min to 7 min) and absolutely randomly.
I have tried :
import numpy as np import matplotlib.pyplot as plt import time signal = np.genfromtxt('path\file.DAT') Time = signal[:,1] t = time.strptime(Time,'%I:%M') y = signal[:,2] plt.plot(t,y) plt.show()Running the program I get the following error message :
Error:Traceback (most recent call last):
Sorry for the short ending,I made a typing error and for a reason I cannot repaste the full Error message at once and it is really long (it took me more than ten minutes to write it all down befoere editing and then I lost it all because the editing time had passed)...
At the end I get :
Error:TypeError: strptime() argument 0 must be str, not <class 'numpy.ndarray'