function eventPlotter(data, eventOfInterest)
% eventPlotter Plot drive cycle with event highlights for MDF example.
%
% Copyright 2018 The MathWorks, Inc.

% Adjust the timestamps to be in a different format.
data.Time.Format = 'mm:ss';

% Create the figure.
figure;

% Plot the raw data.
plot(data.Time, data.Power./1000)

% Overlay the event.
hold on
eventTime = timerange(eventOfInterest.EventStart, eventOfInterest.EventStop);
plot(data.Time(eventTime), data.Power(eventTime)./1000, 'r.', 'MarkerSize', 8)

% Label the plot.
grid on
xlabel('Time (min)')
ylabel('Power (KW)')
legend({'Raw Signal', 'Event'})
title(cellstr(eventOfInterest.FileName))
end
