How to create contour plot within a 2D plot

2 visualizaciones (últimos 30 días)
soheil radfar
soheil radfar el 15 de Ag. de 2020
Comentada: Walter Roberson el 17 de Ag. de 2020
Hi all,
I have to create such a plot but I have no idea how to do it. Can anyone guide me?
I know the equation for mean overtopping discharge and my question is how to draw the colored area (contour).
Cheers,
Soheil

Respuestas (1)

Abdolkarim Mohammadi
Abdolkarim Mohammadi el 15 de Ag. de 2020
When you want to draw multiple plots within one axes, you should put all of the commands between hold on and hold off.
hold on
plot(...);
scatter(...);
contour(...);
hold off
  4 comentarios
soheil radfar
soheil radfar el 17 de Ag. de 2020
I really thank you for your help.
I was able to get the same output as the attached figure.
But one problem I have is that the drawn contour is on the blue lines
While I want the contour to be below the blue lines
When I change the order of the commands, nothing changes.
What do you think is the solution?
Walter Roberson
Walter Roberson el 17 de Ag. de 2020
use plot3 for the lines and give a z coordinate that is greater than 0. When you use contourf() the patches it draws are all at z=0

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by