# Drawing Unconnected 3D Arc in PGFPlots

I am trying to draw a 3-dimensional half circle arc in PGFPlots using a parametric equation. This is the relevant code.

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}

\pgfplotsset{compat=1.17}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
axis lines=middle,
ticks=none,
view = {135}{20},
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
xmin=-1, xmax=1,
ymin=-1, ymax=1,
zmin=0, zmax=1,
unit vector ratio = 1 1 1,
]
({0.5*cos(deg(x))},{0.5*sin(deg(x))},{0.5});
\end{axis}
\end{tikzpicture}

\end{document}


It doesn't look how I want it to, however. I do not want the ends of the arc to be connected. How do I fix this? Thanks in advance! \documentclass[tikz, border=1cm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines=middle,
ticks=none,
view={135}{20},
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
xmin=-1, xmax=1,
ymin=-1, ymax=1,
zmin=0, zmax=1,
%unit vector ratio = 1 1 1,
axis equal,
scale mode=none,
] 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).
• Thank you! samples y=1 did the trick. Thanks also for your other minor improvements of my code. Aug 2 at 17:49