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.

  • Both in Tikz-3dplot and pgfplots this is just a circle of radius 2 in the xy plane at z=2. In tikz-3dplot you can use the key “canvas is currently plane at z=2” for that. If you need explicit examples, please let me know. – Schrödinger's cat Oct 12 at 16:35
  • I am guessing the OP means a cylinder and a plane, and perhaps their intersections, simultaneously on a 3d system. – Maesumi Oct 15 at 18:20

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.

 \begin{scope}[canvas is xy plane at z=2]
  \draw (0,0) circle[radius=2cm];

enter image description here

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,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.