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 个评论

%if true
% code
% end
ytickangle(90);
I tried
s.ytickangle(90) ?
This didn't work
Unrecognized method, property, or field 'ytickangle' for class 'matlab.graphics.chart.StackedLineChart'.
You can add xlabel just like plot function.
But it seems stackedplot does not allow ytickangle,

请先登录,再进行评论。

 采纳的回答

Adam Danz
Adam Danz 2020-11-19

0 个投票

>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 个评论

Thanks. May I know if
set([S.Axes.YLabel],'Rotation',90,'HorizontalAlignment', 'Center', 'VerticalAlignment', 'Bottom')
is possible in version 2019b?
Just tested it in 19b; it worked.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Line Plots 的更多信息

产品

版本

R2019b

标签

Community Treasure Hunt

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

Start Hunting!

Translated by