labels of stacked plot

136 views (last 30 days)
Deepa Maheshvare
Deepa Maheshvare on 11 Nov 2020
Commented: Adam Danz on 20 Nov 2020
Hi All,
I've been going through the examples available here https://in.mathworks.com/help/matlab/ref/stackedplot.html to generate a common x axis for plots
newYlabels = {'RH (%)',['T (' degreeSymbol 'F)'],'P (in Hg)'};
stackedplot(outdoors,'Title','Weather Data','DisplayLabels',newYlabels)
The ylabels are aligned horizontally. I'd like to know how to align vertically. Also , how can we define x label?
  3 Comments
VBBV
VBBV on 12 Nov 2020
You can add xlabel just like plot function.
But it seems stackedplot does not allow ytickangle,

Sign in to comment.

Accepted Answer

Adam Danz
Adam Danz on 19 Nov 2020
>The ylabels are aligned horizontally. I'd like to know how to align vertically.
> Also , how can we define x label?
See the XLabel property.
  2 Comments
Adam Danz
Adam Danz on 20 Nov 2020
Just tested it in 19b; it worked.

Sign in to comment.

More Answers (1)

VBBV
VBBV on 11 Nov 2020
% if true
% code
%end
S = stackedplot(outdoors,'Title','Weather Data','DisplayLabels',newYlabels)
S.XLabel = 'your text'

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by