MATLAB: How to plot 2 surf plots in the same figure plotting so I have 2 surf plots Z1 and Z2. I can plot both separately using surf(X,Y,Z1) and surf(X,Y,Z2) but how do I plot them together on the same plot? Best Answer Use the hold (link) function.figure(1)surf(X,Y,Z1)hold onsurf(X,Y,Z2)hold offgrid on Related SolutionsMATLAB: How to plot multiple surfaces on different planes in the same plot One way would be to offset them by a constant: [X,Y] = meshgrid(-2:0.1:2);Z1 = X.^2 + Y.^2;Z2 = X.^2 - Y.^2;Z3 = cos(2*pi*X) + sin(2*pi*Y);figuresurf(X, Y, Z1)hold onsurf(X, Y, Z2+10)surf(X, Y, Z3+20)hold offgrid on MATLAB: Surf plot without interpolation Stuff NaNs into the elements that are outside the area of interest. That part will not plot. Related Question3D Surf plotPlotting multiple contour plots in one graphSurf plot using meshgrid
Best Answer