Contourf (x,y,z) with unequal columns for y
1 view (last 30 days)
Show older comments
I am trying to use contourf to contour longitude(x), depth(y) and process(z). Each of my depth columns are unequal for each longitude column. For example Longitude 1 goes from 0 to -12 and Longitude 2 goes from 0 to -10. I want to plot each longitude with the depth and the process (no interpolating to make each depth column equal), so it resembles the sea floor. However, I cannot seem to get anything to work. I would appreciate any suggestions and hope this my question is clear enough to understand.
0 Comments
Answers (1)
Walter Roberson
on 3 Oct 2012
You could try using y as a full matrix, and putting nan in at the places that are not populated.
If your y that are there are the same for each latitude, then you can use vector x and y and matrix z with nan in the parts of z that are not populated. I am more certain that this approach will work than putting nan in the y.
3 Comments
Walter Roberson
on 4 Oct 2012
lats = [-90.5 -91]; %etc
depths = 0.5 : 0.5 : 13; %to the maximum used depth
tprocess = process;
tproces(1, 21:end) = nan; %unpopulated at lat #1
contourf(lats, depths, tprocess);
See Also
Categories
Find more on Contour Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!