Acceleration is the rate of change of velocity, so if velocity is linear, the acceleration is the slope of its graph.
Here, the line passes through the points (0, 1) and (0.5, 3), so its slope is
(3 m/s - 1 m/s) / (0.5 s - 0 s) = (2 m/s) / (0.5 s) = 4 m/s²