I'm trying to plot $x^2+y^2 = 4$ and $z=2$ in 3-dimensional space with axes labels.
I came across pgfplot and tikz-3dplot but I could not do it.
I'm trying to plot $x^2+y^2 = 4$ and $z=2$ in 3-dimensional space with axes labels.
I came across pgfplot and tikz-3dplot but I could not do it.
This is just a circle of radius 2 in the xy plane at z=2
. You can draw this circle both with tikz-3dplot
and pgfplots
. Here is a tikz-3dplot
variant.
\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{110}{70}
\begin{tikzpicture}[tdplot_main_coords]
\begin{scope}[canvas is xy plane at z=2]
\draw (0,0) circle[radius=2cm];
\end{scope}
\end{tikzpicture}
\end{document}
How this circle really is going to look depends on the view angles, which are specified by \tdplotsetmaincoords{110}{70}
in the above example. You may only appreciate z=2
really after adding other stuff at different z
position,