# Stop pgfplots from closing a cycle

I'm trying to draw the graph of a curve in three dimensions. For some reason, tikz/pgfplots is automatically closing the curve. I can't figure out how to stop it from doing this. Here is an example:

\begin{tikzpicture}
\begin{axis}
variable=t,
domain=-1.5:1.5] ({t},{0},{20-t^2});
\end{axis}
\end{tikzpicture}


What it produces for me is the following:

For some reason, it has connected the start and end points of the curve.

• For reference, this is described in the pgfplots manual, in the section about \addplot3. In the manual for version 1.18.1, it's section 4.6.2 The \addplot3 Command: Three Dimensional Coordinate Input, on page 125. Quote: "The “auto-completion” depends on how you provide your data. • If you use \addplot3 expression, mesh/rows and mesh/cols are computed from the values samples and samples y. By default, \addplot3 expression always samples a mesh. If you want it to sample a line, set samples y=1 (or, equivalently, y domain=0:0)." Jun 28 at 15:29

You need to tell PGFPlots to only draw the curve once with samples y=1:
\documentclass[tikz]{standalone}