how to use cells as xlabel in stackedplot

3 ビュー (過去 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.
  1 件のコメント
Viktor G.
Viktor G. 2020 年 8 月 22 日
thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by