Alternatives to plot3.

12 visualizzazioni (ultimi 30 giorni)
johndoe
johndoe il 9 Apr 2020
Commentato: johndoe il 9 Apr 2020
The data I'm interested in plotting is: salinity over depth over time.
I've tried the plot3 and scatter3 on the data, but didn't really like the look of it. Is there any other alternatives? I would mainly want a good overview over the data and how it varied in time and also, for it to look nice.
Those mesh and surf plots look really fancy. Didn't really figure out how to make them though.
I used the meshgrid function on time and depth.
[T,D] = meshgrid(t,d,)
`But couldn't figure out how to make the Z (salinity) values match these grids.
The salinity-, depth- and date data are placed in colummns and have same length. To start with though, there's was one time/date measurements linked to multiple depth and salinity measurements, how many of these will vary. Would really appreciat some advice on this.

Risposta accettata

Steven Lord
Steven Lord il 9 Apr 2020
If you have scattered data (your depth and time data doesn't form a regular grid) use griddata or scatteredInterpolant to grid your data then call surf or mesh on the gridded data. See this documentation page for several examples of this technique.
  1 Commento
johndoe
johndoe il 9 Apr 2020
thanks a bunch! :) Will look into it.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by