labels of stacked plot

조회 수: 60 (최근 30일)
Deepa Maheshvare
Deepa Maheshvare 2020년 11월 11일
댓글: Adam Danz 2020년 11월 20일
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
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일
>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개)

카테고리

Help CenterFile Exchange에서 Formatting and Annotation에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by