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

1 ビュー (過去 30 日間)
Sofia Stella 2019 年 11 月 28 日
コメント済み: Sai Bhargav Avula 2019 年 12 月 3 日
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 件のコメント

Sofia Stella 2019 年 12 月 2 日
1) Firstly I have to intersect the DEPTH data of my 3 datasets, because they are not in order. Furthermore, the 3 depth matrixes have different dimensions:
• depth1 dimensions: 31 (which refers the depth levels) x189 (the number of stations)
• depth2 dimensions: 24 x 32
• depth3 dimensions: 31 x 55
2) secondy, I would unite the 3 datasets of the same parameter (aragonite saturation, 'OmegaAR') in a vertical plot with the DEPTH (which should be just one as result of intersections of the previous step).
So, my data are: OmegaAR and depth (that must be ordered).
I hope you could help me.
Regards,
Sofia S.
Sai Bhargav Avula 2019 年 12 月 3 日
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 2019 年 12 月 3 日
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).

サインイン to comment.

### 回答 (1 件)

Sai Bhargav Avula 2019 年 12 月 3 日

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 件のコメント

Sofia Stella 2019 年 12 月 3 日
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 2019 年 12 月 3 日
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.

サインイン to comment.

サインイン してこの質問に回答します。

Translated by