Adjust z-axis location for a pcolor() plot

I am attempting to vertically stack a number of pcolor plots within the same set of axes and then overlay some contour lines onto them. I can get the contour lines to the z-axis values I want using the ContourZLevel property of the contour plot. I tried this with the pcolor parts in the same way but I couldn't get it to work. Is there a similar property for pcolor() or will I need to do something completely different?
EDIT: Okay, so perhaps I haven't explained this very well (or maybe it just can't be done - but I doubt that very much). What I'd like to do is something very similar to that in the below link but for a pcolor plot instead of a contour plot. Is anybody able to help?

 Akzeptierte Antwort

ME
ME am 20 Jan. 2020

2 Stimmen

Okay, so just in case anybody has been looking here anticipating an answer and been disappointed. I have managed to figure this one out - at last!
Here is an example:
y = peaks;
h = pcolor(y);
h.ZData = h.ZData+5;
hold on
pcolor(y)
This will give a plot with a pcolor representation of peaks at z = 5 and another at z = 0 (the default for pcolor plots).
I hope this might help somebody one day!

Weitere Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

ME
am 9 Dez. 2019

Beantwortet:

ME
am 20 Jan. 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by