How to plot the plane x+z=0.
I took four points on x+z=0 plane to form a rectangle. Is this a correct approach?
\documentclass[tikz,border=10mm]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{60}{120} % Set the viewpoint angles
\begin{tikzpicture}[scale=1.5,tdplot_main_coords]
% Define points for the rectangle on the plane
\coordinate (A) at (2,2,-2);
\coordinate (B) at (2.2,-2,-2.2);
\coordinate (C) at (-2.2,-2,2.2);
\coordinate (D) at (-2.2,2,2.2);
% Draw the rectangle
\draw (A) -- (B) -- (C) -- (D) -- cycle;
% Draw the axes
\draw[thick,->] (0,0,0) -- (2.5,0,0) node[anchor=north east]{$x$};
\draw[thick,->] (0,0,0) -- (0,2.5,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,2.5) node[anchor=south]{$z$};
\end{tikzpicture}
\end{document}
2or-2(currently there are some2.2), then it would be correct. In general, the question "is this a correct approach" may be opinion based. Therefore, it is better to ask a more specific question. Maybe have a look atpgfplotsand this related question: Draw the plane x+y=1 in three dimensions in pgfplots. – dexteritas Nov 02 '23 at 10:38