# Combining a ContourPlot3d and parametric plot 3d [closed]

I am trying to put these two graphs together but and getting the shown error:

p1=ContourPlot3D[z-y==3,{x,-2,2},{y,-4,4},{z,0,6},
RegionFunction->Function[{x,y,z},4x^2+y^2<=9],
PlotRange->{0,6.5},
ColorFunction->DarkRainbow]
axes1=ParametricPlot3D[{{t/2,0,0},
{0,t/2,0},
{0,0,t}},
{t,0,6},
PlotRange->{{0,3},{0,.5}{0,6}}]
Show[P1,a2]

Error:

[

Any help would be appreciated

• Typo: you're defining p1 = ... but using Show[P1, ...] :) Commented Jun 20, 2022 at 20:17

In addition to the typo P1 vs. p1, you're missing a comma in the PlotRange for the axes1 plot. Also note that Show uses the plot range of the first plot, in this case p1. So if you want to show the full range of the axes, you need to specify PlotRange in the Show.

Optionally, you can combine the x,y,z ranges and the RegionFunction in the Contour3D plot by plotting over the region.

Module[{p1, a2, axes1},
p1 = ContourPlot3D[
z - y == 3, {x, y, z} \[Element]
ImplicitRegion[
4 x^2 + y^2 <= 9, {{x, -2, 2}, {y, -4, 4}, {z, 0, 6.5}}],
ColorFunction -> "DarkRainbow"];
axes1 =
ParametricPlot3D[{{t/2, 0, 0}, {0, t/2, 0}, {0, 0, t}}, {t, 0, 6}];
a2 = axes1 /. Line[x_] :> {Arrowheads[{0.05}], Arrow[x]};
Show[p1, a2, PlotRange -> {{-2, 3}, {-4, 3}, {0, 6.5}}]
]