how to use cells as xlabel in stackedplot

조회 수: 5 (최근 30일)
Viktor G.
Viktor G. 2020년 8월 21일
편집: Adam Danz 2020년 11월 19일
I have a matrix with 5 columns and the names of the variables as cells. I want to use the cells as the ylabels in the stackedplot. Can anyone help?

채택된 답변

Adam Danz
Adam Danz 2020년 8월 21일
편집: Adam Danz 2020년 11월 19일
First convert your matrix to a table and use the variable names in your cell array.
T = array2table(x, 'VariableNames', varNameArray);
stackedplot(T)
Also see the DisplayLabels property.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by