Notice how the arrows on the mapping diagrams are paired with
the points on the graph of the functions.
You can move the point for $x$ on the mapping diagram to see how the function value for the function $ f(x) = \cos(2x)$ changes both on the diagram and on the graph.
Notice how the graph and mapping diagram visualize the fact that for the cosine function, $\cos(2x)$ has the same basic shape as $\cos(x)$, though its period has changed to $\pi$.
Check the box to show points on the graph and arrows on the diagram
for the function $ f(x) =\cos(2x)$.