答案1
开始吧。看看手册, 或者tikz 的简单介绍更多细节。
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[>=latex]
\draw [ultra thin, gray] (-1,0) grid [step=1] (4,4);
\draw [->] (0,0) -- (5,0) node [right] {$x$};
\draw [->] (0,0) -- (0,5) node [above] {$y$};
\draw [thick, red, <->] plot [domain=-1:3] (\x,{(\x-1)^2}) node [above] {$f(x)$};
\draw [thick, blue, <->] plot [domain=-0.5:1.5] (\x,{(2*\x-1)^2}) node [above] {$f(2x)$};
\draw [->] (2.5,3) -- (1.5,3);
\draw [->] (-0.8,3.5) -- (-0.5,3.5);
\end{tikzpicture}
\end{document}