Tangent to a cubic

The graph shows the gradient of a tangent to a cubic at a point  P  as it moves along the curve.