display rectangle on top of plotyy
Show older comments
Hello community,
I would like to draw a rectangle on top of a plotyy. But the second plot data are always on top of the rectangle. I tried it with uistack, but that isn't working. Here is a small example...
[axh,hLine1,hLine2] = plotyy(1:100,randn(100,1),1:100,randn(100,1));
h = rectangle('Position',[1,0,20,3],'LineWidth',2);
% rectangle on top
uistack(h,'top')
uistack(hLine2,'down')
I really appreciate any help you can provide.
Greetings Sebastian
Accepted Answer
More Answers (0)
Categories
Find more on Two y-axis 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!