From: Walter Roberson on 28 Jan 2010 16:48 Yehonathan Segev wrote: > What I'm trying to do is to stack a pcolor, an annotation rectangle and > a line plot (at this order). I think the problem is that an annotation > rectangle is considered at a higher level than the plot axes and > therefor always stays on top. I'm not sure what kind of annotation rectangle you are using, but if you are using something like legend() then what you need to know is that it constructs a separate axis in the figure, and that axis is normally on top. If you move the legend axis using uistack() or setting the children order of the figure, then the legend will move underneath the axis that contains the pcolor and the line plot. Thus, the solution is to pcolor, then legend(), then find the parent axis of the pcolor() and create a third axis that is the same size but has 'axis', 'off' (so you don't overwrite the lower tick marks) and has the same Position and InnerPosition as the axis for the pcolor, and has 'Color', 'none' so that it is transparent. Then draw the line plot in that third axis, either by specifying the axis number as the first parameter to plot(), or by specifying the axis number as the 'Parent' property for the plotting command. |