Contours at a specific height from the surface || surfc

4 visualizaciones (últimos 30 días)
Jaladhar Mahato
Jaladhar Mahato el 26 de Ag. de 2019
Comentada: darova el 26 de Ag. de 2019
Hi,
Is it possible to add the contours at a specific height from the surface plot using surc? I have seen that the contours are closely attached with the surface plot. Here, I have attached the Z data. The range of X axis and Y axis is from 0 to 11. I put the Z data accordingly. Here, You can see that the contours are very close with the surface and very difficult to see the individual countour. When I rorate the 3D plots, some of the contours are visible, however, they are still very close. Is there any way to separe the countours and the surface plots?
Regards,
Jaladhar
  3 comentarios
Jaladhar Mahato
Jaladhar Mahato el 26 de Ag. de 2019
Sorry, it does not serve my purpose. It could help me if, plot3 works instead of scatter3, however, it fails to work.
darova
darova el 26 de Ag. de 2019
Look here contour for Contour Matrix. Extract contours and plot them using plot3()

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 26 de Ag. de 2019
One way to put some distance between the surfc plot and the contours is with: Customizing contour plots part 2
If you want to show the contour lines on the surf plot, try this:
D = load('Surface_Data.mat');
B = D.B;
figure
surfc(B)
shading('interp')
hold on
contour3(B, 'r', 'LineWidth',2)
hold off
grid on
Experiment to get the result you want.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by