Changing axes linewidth on a stacked plot

10 ビュー (過去 30 日間)
Elliot Tseng
Elliot Tseng 2021 年 2 月 26 日
コメント済み: Elliot Tseng 2021 年 3 月 8 日
I cannot change the axes linewidth on a stacked plot, at least in the way that I am able to change the axes linewidth in other types of plots. For example, I have tried the following with no change to the axes linewidth:
figure(1)
stackedplot(time_axis, testdata)
hAx=gca;
hAx.LineWidth=2;

採用された回答

Adam Danz
Adam Danz 2021 年 2 月 27 日
編集済み: Adam Danz 2021 年 3 月 3 日
You have to access the axis handles first.
h = stackedplot(rand(10,4));
ax = findobj(h.NodeChildren, 'Type','Axes'); % use flipud to puts axes in order.
set(ax,'LineWidth',2)
  1 件のコメント
Elliot Tseng
Elliot Tseng 2021 年 3 月 8 日
Thanks Adam, works great.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by