Is it possible to change stackedplots background color?

4 ビュー (過去 30 日間)
Goncalo Torres
Goncalo Torres 2019 年 10 月 18 日
編集済み: Adam Danz 2020 年 11 月 24 日
I have been developing apps with stackedplots, but I can't find a way to change the background color (white by default).
I guess is not implemented for this type of plots, so I was wondering if there is any other trick I can use.

採用された回答

Devineni Aslesha
Devineni Aslesha 2019 年 10 月 29 日
As of now, changing the background color in stackedplot is not supported in AppDesigner -> uifigure for the available MATLAB releases. However, the concerned parties may be looking into it and might be added in the future releases.

その他の回答 (1 件)

Adam Danz
Adam Danz 2020 年 11 月 19 日
編集済み: Adam Danz 2020 年 11 月 24 日
You can get the axis handles in stackedplot using the undocumented NodeChildren property. Then change background color.
rng('default')
h = stackedplot(rand(100,4));
ax = findobj(h.NodeChildren, 'Type','Axes');
set(ax,'Color',[.8 .8 .8])
To set the color of a selected axis number n,
% set(ax(n), ...)
  1 件のコメント
Gonçalo Torres
Gonçalo Torres 2020 年 11 月 19 日
Thanks a lot, extremely helpful!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by