Is it possible to change stackedplots background color?

조회 수: 3 (최근 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), ...)

카테고리

Help CenterFile Exchange에서 Errorbars에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by