Changing layers on a bar graph

3 ビュー (過去 30 日間)
Jiaqi Wang
Jiaqi Wang 2022 年 8 月 1 日
コメント済み: Jiaqi Wang 2022 年 8 月 4 日
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 Center および File ExchangeDevelop 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