Help with ocean transect plot
Hi Matlabbers,
I’m fairly new to the community and struggling to make a transect plot of some nitrate data that I have from CTD casts. I have 11 stations across an area, each with different depths, and each with various nitrate concentration data.
So, what I want to produce is a transect plot, showing water depth on the y axis, distance between stations on x-axis and the nitrate concentration at each station on the z-axis, but in a 2D plot.
My issue is, for each station, the depth varies, and my nitrate concentration data is quite scattered, hence I want to interpolate it so that for missing data (NaNs), it takes the concentration from neighbouring stations at the same depth and generates a value. When I do this using my data, Matlab interpolates across the rows which doesnt work since there are various depths across each row. I can’t really make a uniform depth profile because it differs so much between each station. I’ve tried fillmissing and interp1 to get around the fact that i have so many NaN values, but the results are really blocky.
Any suggestions?
This is what I currently get:
And this is the sort of look I’m after
Thanks in advance :)Hi Matlabbers,
I’m fairly new to the community and struggling to make a transect plot of some nitrate data that I have from CTD casts. I have 11 stations across an area, each with different depths, and each with various nitrate concentration data.
So, what I want to produce is a transect plot, showing water depth on the y axis, distance between stations on x-axis and the nitrate concentration at each station on the z-axis, but in a 2D plot.
My issue is, for each station, the depth varies, and my nitrate concentration data is quite scattered, hence I want to interpolate it so that for missing data (NaNs), it takes the concentration from neighbouring stations at the same depth and generates a value. When I do this using my data, Matlab interpolates across the rows which doesnt work since there are various depths across each row. I can’t really make a uniform depth profile because it differs so much between each station. I’ve tried fillmissing and interp1 to get around the fact that i have so many NaN values, but the results are really blocky.
Any suggestions?
This is what I currently get:
And this is the sort of look I’m after
Thanks in advance 🙂 Hi Matlabbers,
I’m fairly new to the community and struggling to make a transect plot of some nitrate data that I have from CTD casts. I have 11 stations across an area, each with different depths, and each with various nitrate concentration data.
So, what I want to produce is a transect plot, showing water depth on the y axis, distance between stations on x-axis and the nitrate concentration at each station on the z-axis, but in a 2D plot.
My issue is, for each station, the depth varies, and my nitrate concentration data is quite scattered, hence I want to interpolate it so that for missing data (NaNs), it takes the concentration from neighbouring stations at the same depth and generates a value. When I do this using my data, Matlab interpolates across the rows which doesnt work since there are various depths across each row. I can’t really make a uniform depth profile because it differs so much between each station. I’ve tried fillmissing and interp1 to get around the fact that i have so many NaN values, but the results are really blocky.
Any suggestions?
This is what I currently get:
And this is the sort of look I’m after
Thanks in advance 🙂 interpolation, plotting, scattered data, transect plot MATLAB Answers — New Questions
​