# 3D figure using tikz-pgf - Intersection of two planes

I'm trying to draw a figure using tikz-pgf. This figure should have two planes in it: z=x and z=0. So far I've managed to write the following:

\documentclass[a4paper,12pt]{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=-1:1,y domain=-1:1]
\end{axis}
\end{tikzpicture}
\end{document}


But the result is weird, because it's not clear where the intersection of both planes is. I would like the plane z=0 to "cover" a bit of the plane z=x, as if the figure was viewed from above. Is there any easy way to do this?

• Welcome to TeX.SX! Please help us (and also you) and add a minimal working example (MWE), that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass and ending with \end{document}. May 6, 2017 at 11:56
• @Bobyandbob Thanks for the suggestion, I just edited the code. May 6, 2017 at 11:58
• Maybe related and helpful: tex.stackexchange.com/q/73922/124842 or tex.stackexchange.com/a/52954/124842 May 6, 2017 at 12:08
• @Bobyandbob Thank you, I'll have a look but I doubt I can manage to solve it, it's the first time I try to draw a plot in Latex and that code seems complicated. May 6, 2017 at 12:12

You can use the method of this answer. There a combination of surface colors, opacities and plots get close to the desired result.

Your intersection is x=0, y=-1:1, z=0 with \addplot3+ you can draw this line. mark=none disables the marks. Optional you can use the style thick.

MWE:

\documentclass[a4paper,12pt]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=-1:1,y domain=-1:1]