Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how create plot with 3 dataset of same parameter across the depth

1 visualización (últimos 30 días)
Sofia Stella
Sofia Stella el 28 de Nov. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello everyone,
I need to plot 3 dataset of same parameter (aragonite saturation) on X axes and depth on Y axes.
How could I do it?
Thank you very much!
  4 comentarios
Sai Bhargav Avula
Sai Bhargav Avula el 3 de Dic. de 2019
Can you explain what intersect the DEPTH data of my 3 datasets mean. Does it mean solving the curve that the datasets fits in.
What plot do you want to use (eg. scatter, plot)? Also what do mean by vertical plot (is it like a 3D histogram).
Sofia Stella
Sofia Stella el 3 de Dic. de 2019
Editada: Sofia Stella el 3 de Dic. de 2019
I put some examples to show you why the depth data are different in 3 datasets (they have not same levels and i can't unify them together):
As you can see from 3 datasets i have 3 different levels of depth, but I need same levels, and I need SCATTER PLOT , so a 2d plot with dots, of the aragonite across the depth (vertical I mean from surface of water, 0meters, to the bottom).

Respuestas (1)

Sai Bhargav Avula
Sai Bhargav Avula el 3 de Dic. de 2019
Editada: Sai Bhargav Avula el 3 de Dic. de 2019
Hi,
With the data you provided, I understand that you have data of different dimensions (In this case different depth values and the number stations).
The data has several NaN values which needs to be handled. A possible work around would be extracting each row and use the rmmissing to remove the missing data at each station for all the 3 datasets.
Then you can either use a interp1 to interpolate all the 3 datasets depths values at a particular station to the desired number of depth values. Or truncated the depth values to the minimum of all the 3 datasets at a particular dataset. Then use the scatter plot to plot the data
Hope this helps!
  2 comentarios
Sofia Stella
Sofia Stella el 3 de Dic. de 2019
Editada: Sofia Stella el 3 de Dic. de 2019
That's cool!
But, if I use rmmissing this eliminates all the rows and get my assay a vector (I obtain just 2 rows instead originally 31).
Which function is better for a matrix?
Do you suggest me to use logical array?
I'm not so practical about the program, is not so simple to me.
Thank you very much
Sai Bhargav Avula
Sai Bhargav Avula el 3 de Dic. de 2019
Since you need to plot the depth anyway, As suggested earlier I would recommend you to extract each row(meaning at each station) and work use rmmissing over it(As you need to again interpolate to match the dimensions of all the 3 datasets at that particular station).
Considering the entire flow that needs to be done. I think this way would help you.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by