Overlay contour on colored image
Show older comments
I want to overlay contour on image using imagesc. The y-direction of both the figure is coming opposite to each other. I am unable to flip the Y direction by setting gca.
I am new to Matlab please help.
I have attached my data.m file.
My code:
imagesc(dates,depth,temp)
colormap(jet);
ylim([50 200])
hold on
dep=depth(1:71);
TT=temp(1:71,:)
contour(dates,dep,TT);
5 Comments
Walter Roberson
on 3 Feb 2021
imagesc(dates,depth,flipud(temp))
Adam Danz
on 3 Feb 2021
> I am unable to flip the Y direction by setting gca
What's preventing you from doing that?
Bjorn Gustavsson
on 3 Feb 2021
pcolor(dates,depth,temp),shading flat
Dolly More
on 3 Feb 2021
Adam Danz
on 3 Feb 2021
This answer shows how to use two different colormaps for the imagesc and contour plots.
Answers (0)
Categories
Find more on Contour Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!