Make a small circle look as if it’s projected on a plane in xyz coordinates

3dtikz-pgf

I'm using an xyz coordinate system to draw a 3D axis and a plane. I've labelled the plane using a circle. However, since the circle isn't projected onto the plane but "faces" the viewer, it breaks the 3D perspective.

Is there some way to project the circle onto the plane? I'd be happy even with a clever ellipse that works only for this specific case.

enter image description here

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[x=0.5cm,y=0.5cm,z=-0.25cm]
% plane
\filldraw[fill=lightgray!50] (0,0) -- (xyz cs:y=3,z=0) -- (xyz cs:y=3,z=3) -- (xyz cs:y=0,z=3) -- cycle;
% axis
\draw[-stealth] (xyz cs:x=0) -- (xyz cs:x=4);
\draw[-stealth] (xyz cs:y=0) -- (xyz cs:y=4);
\draw[-stealth] (xyz cs:z=0) -- (xyz cs:z=4);
% plane label+marker
\node[circle, fill=black, inner sep=0pt, minimum size=6pt] at (xyz cs:y=1,z=1.5) (plane marker) {};
\node[anchor=north west] at (xyz cs:x=0,y=-1,z=0) (plane label) {plane};
\draw (plane label.west) to[out=180,in=-90] (plane marker);
\end{tikzpicture}
\end{document}

Best Answer

You can make use of the 3d library and instead of using a node (which won't be affected by the 3D transformation) draw a real circle and place a coordinate at its center:

\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{3d}
\begin{document}
\begin{tikzpicture}[x=0.5cm,y=0.5cm,z=-0.25cm]
% plane
\filldraw[fill=lightgray!50] (0,0) -- (xyz cs:y=3,z=0) -- (xyz cs:y=3,z=3) -- (xyz cs:y=0,z=3) -- cycle;
% axis
\draw[-stealth] (xyz cs:x=0) -- (xyz cs:x=4);
\draw[-stealth] (xyz cs:y=0) -- (xyz cs:y=4);
\draw[-stealth] (xyz cs:z=0) -- (xyz cs:z=4);
% plane label+marker
% \node[circle, fill=black, inner sep=0pt, minimum size=6pt] at (xyz cs:y=1,z=1.5)  {};
\begin{scope}[canvas is yz plane at x=0]
    \fill (1,1.5) circle[radius=6pt]
        coordinate (plane marker);
\end{scope}
\node[anchor=north west] at (xyz cs:x=0,y=-1,z=0) (plane label) {plane};
\draw (plane label.west) to[out=180, in=-90] (plane marker);
\end{tikzpicture}
\end{document}

enter image description here