Three dimensional plot using 4 variables

14 vues (au cours des 30 derniers jours)
MIDHILA VARNA
MIDHILA VARNA le 22 Déc 2017
Modifié(e) : ANKUR KUMAR le 26 Déc 2017
I have 4 variables Latitude,longitude,depth of maximum salinity and maximum salinity, I would like to create a 3D plot with these variables for a single month. These variables are located in netcdf file and I have extracted them using the netcdf package, I have tried the surface plots but it did not gain any output. The data is in 3Dimension from which I have converted into 2 Dimension by collecting data of the same month.
  2 commentaires
ANKUR KUMAR
ANKUR KUMAR le 22 Déc 2017
Do you want 3D plot or contour plot?
MIDHILA VARNA
MIDHILA VARNA le 23 Déc 2017
I need a contour plot of the variation of maximum salinity with the other 3 variables

Connectez-vous pour commenter.

Réponse acceptée

ANKUR KUMAR
ANKUR KUMAR le 25 Déc 2017
For the contour plot, you can use
contour(lon,lat,salinity')
If you want the filled contour plot, then you can use
contourf(lon,lat,salinity')
If you want labels on the contour plot, then you can use clabel
  3 commentaires
ANKUR KUMAR
ANKUR KUMAR le 26 Déc 2017
Modifié(e) : ANKUR KUMAR le 26 Déc 2017
You can use surf
surf(X,Y,Z,'FaceAlpha',0.5,'EdgeColor','none';)
X and Y should be the meshgrid of latitude and longitude
And in the same fashion, you can write contour3, but you will not get filled colors in contour3 (I think).
MIDHILA VARNA
MIDHILA VARNA le 26 Déc 2017
Thank you.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Contour Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by