Rotate stacked plot Labels to have them vertical - App Designer

55 ビュー (過去 30 日間)
Andrea Quintarelli
Andrea Quintarelli 2019 年 8 月 13 日
コメント済み: Adam Danz 2023 年 6 月 1 日
i am using stacked plots in App Designer to visulize some data and i would love to rotate the labels on the left side of these plots, having them in vertical direction.
Does Anybody know if this is possible at all with stacked plots?
Thank you very much!


Sahithi Kanumarlapudi
Sahithi Kanumarlapudi 2019 年 8 月 16 日
For normal plots ytickangle can be used in order to rotate the y-axis label.
But in case of stacked plots y-axis labels are treated as DisplayLabels and their orientation cannot be changed.
  3 件のコメント
hirdesh kumar pharasi
hirdesh kumar pharasi 2020 年 6 月 14 日
編集済み: hirdesh kumar pharasi 2020 年 6 月 14 日
True, only for that particular reason I am unable to use it


その他の回答 (1 件)

Adam Danz
Adam Danz 2020 年 11 月 19 日
編集済み: Adam Danz 2023 年 5 月 17 日
You can get the axis handles in stackedplot using the undocumented NodeChildren property. Then rotate and center the labels.
h = stackedplot(rand(100,4));
ax = findobj(h.NodeChildren, 'Type','Axes');
set([ax.YLabel],'Rotation',90,'HorizontalAlignment', 'Center', 'VerticalAlignment', 'Bottom')
  5 件のコメント
Adam Danz
Adam Danz 2023 年 6 月 1 日
@Pedro when using undocumented features there's no guarantee that they will always work. Figures generated in live scripts behave differently and don't support these undocumented features.
I recommend writing to tech support to request an interpreter property in stackedplot as well as having access to the axes label handles. Go to Contact Support > Report a Bug > Select Technical Support & Product help, bugs, suggestions.



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

Community Treasure Hunt

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

Start Hunting!

Translated by