# Drawing a Plane in 3D space

How can I draw a plane with equation $- \sqrt{3} x+y=0$ in space (with tikz)?

You cannot simply use rectangle, which will not produce the expected output. But you can draw the plane "manually" like so:

\documentclass{article}

\usepackage{tikz}
\usepackage{tikz-3dplot}

\begin{document}

\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[scale=3,tdplot_main_coords]
\draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
\def\x{.5}
\draw[thin] (0,0,0) -- ({1.2*\x},{sqrt(3)*1.2*\x},0) node[below] {$y=\sqrt{3}x$};
\filldraw[
draw=red,%
fill=red!20,%
]          (0,0,0)
-- (\x,{sqrt(3)*\x},0)
-- (\x,{sqrt(3)*\x},1)
-- (0,0,1)
-- cycle;
\draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
\end{tikzpicture}

\end{document}


An Asymptote answer for an old question. Here p=plane(A,B) is the plane (parallelogram) O--A--A+B--B--cycle that we can fill the inside

draw(surface(p),magenta+opacity(.2));


and draw the boundary

draw(p,magenta+.6pt);


Other things are just for decorating.

// run Asymptote code on http://asymptote.ualberta.ca/
// Draw the plane sqrt(3) x - y = 0
unitsize(1cm);
import three;
draw(Label("$x$",EndPoint,align=SW),O--2.5X,Arrow3);
draw(Label("$y$",EndPoint),O--4Y,Arrow3);
draw(Label("$z$",EndPoint),O--3Z,Arrow3);

triple A=(1,sqrt(3),0), B=2Z;
path3 p=plane(A,B);
draw(surface(p),magenta+opacity(.2));
draw(p,magenta+.6pt);
label("$x\sqrt{3} -y =0$",A+B,NE,magenta);
draw(Label(scale(.6)*"$1$",EndPoint,align=NW,black),A--(A.x,0,0),gray+dashed);
draw(Label(scale(.6)*"$\sqrt{3}$",EndPoint,align=.4dir(60),black),A--(0,A.y,0),gray+dashed);