How to plot 3D filled contour ?

55 visualizaciones (últimos 30 días)
Kamran Afroz
Kamran Afroz el 24 de Nov. de 2021
Respondida: Star Strider el 24 de Nov. de 2021
HI all!
I have a data with Lat*Lon*Levels (i.e. 161*161*18 double) and I want to plot a filled 3-D contour to show variation throughout the levels.
I am getting error for dimensions as dimension should be 2*2.
Can someone help?

Respuestas (2)

KSSV
KSSV el 24 de Nov. de 2021
You can plot one level at a time:
for i = 1:18
plot(lon,lat,levels(:,:,i)')
shading interp
drawnow
end
If you want to show variation, you need to decide the plane to display and then plot it. For this you need to use slice. Read about slice.

Star Strider
Star Strider el 24 de Nov. de 2021
It would help to know the data and the desired result.
One option is to use the surf function and contour3
[X,Y,Z] = peaks(50);
figure
surf(X, Y, Z+5, 'EdgeColor','none')
hold on
contour3(X, Y, Z+5, 15, '-k', 'LineWidth',1)
hold off
grid on
xlabel('Latitude (°)')
ylabel('Longitude (°)')
zlabel('Elevation (km)')
There are probably Mapping Toolbox functions that work similarly if that is being used in the data analysis.
.

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by