# Drawing intersection of plane and parabolic surface in PGFplots

I want to draw the surface x^2-y in PGFplots in 3D and intersect it with the plane z=1, emphasizing the intersection probably with some coloration or shading or something. I'd also like to emphasize the y-axis and the z-axis.

I've read a few similar posts on here and tried to edit them, but I can't seem to get them into the shape I want. Does anyone have a suggestion for something I can try?

EDIT:

I've been working up a minimum working example of the code, where the intersection is not at all emphasized. Also, I've read elsewhere now that there are problems drawing intersections with PGFplots and that sometimes PStricks is better. I'm fine with either solution, I just want something that works.

\documentclass[12pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
xlabel = $x_1$,
ylabel = $x_2$,
zlabel = $x_3$,
zlabel style={rotate = -90},
zmin = 0, zmax = 2
]
\end{axis}
\end{tikzpicture}
\end{document}


The result looks like crap in my opinion, but I have no idea how to make it look nice.

Here’s a kind of hackish pair of solutions that required a bit of algebra. There’s a library in pgfplots, fill between, which does intersections and fills for 2-d plots but doesn’t seem to work for this.

The first image draws the plane after the surface and then adds an intersection line manually. The second rewrites the equation for the surface as two parameterized surfaces, one above the plane of intersection and one below.

\documentclass[12pt]{standalone}
\usepackage[svgnames]{xcolor}
\usepackage{pgfplots}

\pgfplotsset{compat=1.12}

\pgfplotsset{ colormap={below}{rgb255(0cm)=(127, 255, 212); rgb255(1cm)=(100, 149, 237)} }
\pgfplotsset{ colormap={above}{rgb255(0cm)=(100, 149, 237,128); rgb255(1cm)=(65, 105, 225,128)} }

\begin{document}
\begin{tikzpicture}
\begin{axis}
[
xlabel = $x_1$,
ylabel = $x_2$,
zlabel = $x_3$,
zlabel style={rotate = -90},
xmin = -4, xmax = 4,
ymin = -5, ymax = 5,
zmin = 0, zmax = 2
]
\addplot3[samples y=0,domain=-sqrt(6):sqrt(6),color=DarkCyan]({x}, {x*x - 1}, {1});
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}
[
xlabel = $x_1$,
ylabel = $x_2$,
zlabel = $x_3$,
zlabel style={rotate = -90},
xmin = -4, xmax = 4,
ymin = -5, ymax = 5,
zmin = 0, zmax = 2,
]