Rotate stacked plot Labels to have them vertical - App Designer

123 views (last 30 days)
Hi,
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!
question.JPG

Accepted Answer

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi on 16 Aug 2019
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 Comments

Sign in to comment.

More Answers (1)

Adam Danz
Adam Danz on 19 Nov 2020
Edited: Adam Danz on 24 Nov 2020
You can get the axis handles in stackedplot using the undocumented NodeChildren property. Then rotate and center the labels.
rng('default')
h = stackedplot(rand(100,4));
ax = findobj(h.NodeChildren, 'Type','Axes');
set([ax.YLabel],'Rotation',90,'HorizontalAlignment', 'Center', 'VerticalAlignment', 'Bottom')

Community Treasure Hunt

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

Start Hunting!