Revamp your input parsing a little...
fmt=['%s %d %d %d %f %*s']; % string type, ID, HR, MN, S.SSS, blank record
fid=fopen('rec_0.txt','r'); % open the file
c=textscan(fid,fmt,'delimiter','\n'); % read the file
t=table(datetime(2019,1,1,c{3},c{4},c{5}),categorical(c{1}),categorical(c{2}), ...
'VariableNames',{'Time','Action','Code'}); % convert to table for convenience...
See what we gots...
>> disp(t)
Time Action Code
____________________ _______________ ____
01-Jan-2019 18:11:05 RECORDING_START 1
01-Jan-2019 18:11:26 LEVER_PRESS 3
01-Jan-2019 18:11:26 REWARD 4
01-Jan-2019 18:11:45 LEVER_PRESS 3
01-Jan-2019 18:11:45 REWARD 4
01-Jan-2019 18:12:02 LEVER_PRESS 3
01-Jan-2019 18:12:02 REWARD 4
01-Jan-2019 18:12:22 LEVER_PRESS 3
01-Jan-2019 18:12:22 REWARD 4
01-Jan-2019 18:12:43 LEVER_PRESS 3
01-Jan-2019 18:12:43 REWARD 4
01-Jan-2019 18:13:01 LEVER_PRESS 3
01-Jan-2019 18:13:01 REWARD 4
01-Jan-2019 18:13:22 LEVER_PRESS 3
01-Jan-2019 18:13:22 REWARD 4
01-Jan-2019 18:13:41 LEVER_PRESS 3
01-Jan-2019 18:13:41 REWARD 4
01-Jan-2019 18:13:59 LEVER_PRESS 3
01-Jan-2019 18:13:59 REWARD 4
01-Jan-2019 18:14:25 LEVER_PRESS 3
01-Jan-2019 18:14:25 REWARD 4
01-Jan-2019 18:14:43 LEVER_PRESS 3
01-Jan-2019 18:14:43 REWARD 4
01-Jan-2019 18:15:01 LEVER_PRESS 3
01-Jan-2019 18:15:01 REWARD 4
01-Jan-2019 18:15:18 LEVER_PRESS 3
01-Jan-2019 18:15:18 REWARD 4
01-Jan-2019 18:15:36 LEVER_PRESS 3
01-Jan-2019 18:15:36 REWARD 4
01-Jan-2019 18:15:54 LEVER_PRESS 3
01-Jan-2019 18:15:54 REWARD 4
01-Jan-2019 18:16:11 RECORDING_END 2
>>
The abvoe hardcodes the beginning date as ther first of current year, fix that to whatever is your acquisition date for general use.
Now you can use the plot routines that are datetime aware directly.
Of course, subtract (diff() to get durations.