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 件のコメント

VBBV
VBBV 2020 年 11 月 11 日
%if true
% code
% end
ytickangle(90);
Deepa Maheshvare
Deepa Maheshvare 2020 年 11 月 11 日
編集済み: Deepa Maheshvare 2020 年 11 月 11 日
I tried
s.ytickangle(90) ?
This didn't work
Unrecognized method, property, or field 'ytickangle' for class 'matlab.graphics.chart.StackedLineChart'.
VBBV
VBBV 2020 年 11 月 12 日
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 件のコメント

Deepa Maheshvare
Deepa Maheshvare 2020 年 11 月 20 日
Thanks. May I know if
set([S.Axes.YLabel],'Rotation',90,'HorizontalAlignment', 'Center', 'VerticalAlignment', 'Bottom')
is possible in version 2019b?
Adam Danz
Adam Danz 2020 年 11 月 20 日
Just tested it in 19b; it worked.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

製品

リリース

R2019b

タグ

質問済み:

2020 年 11 月 11 日

コメント済み:

2020 年 11 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by