Contour plot cutting off surface value?
1 visualización (últimos 30 días)
Hi i have a contour plot showing a depth profile of nutrients in the ocean over time however when using meshgrid to interpolate it doesn't seem to be calculating any values for the upper most layer?
[xq,yq] = meshgrid(min(date):1/12:max(date),-4000:100:0);
varq = griddata(date,-depth,var,xq,yq);
using the above code it plots a contour map from -4000m up to -100m but only white space from -100m to 0m? The only way i have been able to change this is by changing the steps in the meshgrid from -4000:100:0 to -4000:0 however this creates a very grainy contourplot and ideally i would like to keep the averaged smoother plot? how can i do this without loosing the surface data?
Mike Garrity el 23 de Mzo. de 2016
We don't have access to your data, so we can only guess, but ...
When you say that increasing the grid resolution makes the contour "grainier", then my guess would be that you're not interpolating at all. My guess would be that you are actually approaching the resolution of your input data, and that the coarser grid is simply subsampling.
I would suggest comparing your gridded data with your original data by combining a surface and a scatter, as I showed in the thread for this question. You can do that for a subset of your data if it's large. If the high-res grid is comparable to the spacing of your original data points, then I think you need to be careful about how you go down to the low-res grid. You would really want to low-pass filter to make sure you're not aliasing any high frequencies in your data.