Changing layers on a bar graph

4 次查看(过去 30 天)
I am making a plot like this:
I want to move the green rectangles behind the two bars. Is there any ways to achieve that other than simply chanign the transparency?
Thanks for everyone who answers my question!

采纳的回答

Adam Danz
Adam Danz 2022-8-1
编辑:Adam Danz 2022-8-1
Plot the green bars first, before the bar plot.
Alternatively use uistack to control the stacking order of graphics objects.
  5 个评论
Adam Danz
Adam Danz 2022-8-2
编辑:Adam Danz 2022-8-4
Demo:
figure
bar(1:3)
hold on
h = plot([0,4],[.5 .5],'k-','LineWidth', 5);
figure
bar(1:3)
hold on
h = plot([0,4],[.5 .5],'k-','LineWidth', 5);
uistack(h,'bottom')
Jiaqi Wang
Jiaqi Wang 2022-8-4
This works perfectly! Thank you so much!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by