Consider:
f[x_, y_] = 6 - 3 x - 2 y;
GraphicsRow[{
Plot3D[f[x, y], {x, -4, 4}, {y, -4, 4},
MeshFunctions -> {#3 &}],
ContourPlot[f[x, y], {x, -4, 4}, {y, -4, 4},
Contours -> 15,
PlotLegends -> Automatic]
}]
How can I make the Plot3D colors exactly the same as the contour plot colors, shading according to height with the same color strategy as in the contour plot.
=
and:=
. Your function should be defined asf[x_, y_] := 6 - 3 x - 2 y
to protect it from being "destroyed" by assignments tox
ory
. Recommend you read through this community wiki $\endgroup$