I've plotted the following graph, using tikz
:
But I don't know how to make the vectors end exactly on the circle. Is there any simple way to do it?
CODE
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}% To get more advances positioning options
\usetikzlibrary{arrows}
\usepackage{mathtools}
\begin{document}
\begin{tikzpicture}
\draw[step=1cm,gray!25!,very thin] (-5,-5) grid (5,5);
\draw[thick,->] (-3,0) -- (3,0) node[anchor=north west] {x axis};
\draw[thick,->] (0,-3) -- (0,3) node[anchor=south east] {y axis};
\draw[thick,->] (0,0) -- (2,2) node[midway,above] {$\vec{a}$};
\draw[thick,->] (-2,0) -- (2,2) node[midway, above] {$\vec{a'}$};
\draw[blue, thick,->] (-2,0) -- (0,0) node[midway, above] {$\Delta x$};
\draw[red, thick] (0,0) circle (2 cm);
\end{tikzpicture}
\end{document}
Best Answer
You could use polar coordinates. And you do not need the libraries you are loading here, and in any case I would prefer
arrows.meta
overarrows
.mathtools
is not used either. And I would label repeating coordinates such that the diagram becomes easier to adjust.