here's my MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{amsmath}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{figure}[ht]
\centering
\begin{tikzpicture}
\begin{axis}[
width=0.6\textwidth,
view={0}{90},
domain=0:2*pi+0.5,
y domain=0:2*pi+0.5,
xmax=2*pi+1, ymax=2*pi+1,
samples=15,
axis equal image,
axis lines = center,
xtick = {0,3.14,6.28},
ytick = {0,3.14,6.28},
xticklabels = {0,$\pi$,$2\pi$},
yticklabels = {0,$\pi$,$2\pi$}
]
\addplot3 [blue, quiver={u={1}, v={sin(deg(\x))^2}, scale arrows=0.3, every arrow/.append style={-latex}}] (x,y,0);
\addplot [thick, red] {2-sin(deg(\x))*cos(deg(\x))/2+\x/2};
\end{axis}
\end{tikzpicture}
\caption{Retningsfelt (blå) for $\dfrac{d x}{d t}=\sin^2(t)$, med løsningskurve (rød) gennem $x(0)=2$.}
\label{fig:bvp1}
\end{figure}
\end{document}
I get the error message
Package pgfplots Warning: Axis range for z is approximately empty; enlarging it (it is [0.0;0.0]) on input line 29.
I've tried some of the fixes I read on other posts, but I haven't seemed to make any of it work.
restrict z to domain=0:0,
to your axis options ?