Plotting using x-axis arrays that are not in monotonically increasing order?
Show older comments
My goal is to plot a curtain profile using imagesc() with the x-axis corresponding to the Latitude values and y-axis to the Altitude. My x-axis data are the latitude points of an instrument orbiting the Earth. In this scenario, the latitude values increase (reaching top of orbit) and then they decrease.
I've been able to successfully plot these profiles for when the latitude values were in increasing/decreasing order but not when they have both scenarious occuring.
Anyone have an idea/code that can fix this error? Thank you!
x = latitude;
y = altitude;
z = data; % (in matrix format)
imagesc(x, y, z)
%Error: x vector must be in increasing order%
3 Comments
Cris LaPierre
on 9 Mar 2019
Easier to play with actual data. Can you upload a mat file with your x, y, and z data?
Walter Roberson
on 9 Mar 2019
Perhaps
pcolor(x, y, data)
Natasha D
on 11 Mar 2019
Accepted Answer
More Answers (0)
Categories
Find more on Create Plots on Maps 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!