You need to add the compat option to tell pgfplots which version you want to use. The most recent version is 1.11, or you can use the keyword newest to always use the newest version. Note that the default behavior of assigning points was changed in v1.11, so you need to set the compatibility equal to or newer than that. Note also that the newest syntax is not recommended according to the package author (or at least, you should know you have a reason to use newest instead of an explicit version).
\documentclass{article}
\usepackage{pgfplots}
%\pgfplotsset{compat=newest} %<------ Here
\pgfplotsset{compat=1.11} %<------ Or use this one
\begin{document}
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
xmin=0,
xmax=4,
ymin=0,
ymax=4,
]
\draw (1,1) -- (3,2);
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
In fact, if you look at the log for the OP MWE (without the compat being set), you find the following message:
Package pgfplots Warning: running in backwards compatibility mode (unsuitable t
ick labels; missing features). Consider writing \pgfplotsset{compat=1.11} into
your preamble.
on input line 4.
which tells you most of what you need to know!
(axis cs: 1,1) -- (axis cs: 3,2);, you should see the line in all versions (you can verify by changing the version in the compat setting) – darthbith Nov 06 '14 at 14:30pgfplotsis a superset of thetikz, and is built withtikzas the "base" drawing commands. That is to say,pgfplotsprovides macros likeaddplotthat usedrawetc. underneath to actually draw the lines. If you have further questions, you should ask a new question. – darthbith Feb 23 '15 at 02:40