Rotate stacked plot Labels to have them vertical - App Designer
55 ビュー (過去 30 日間)
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 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.
その他の回答 (1 件)
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')