how to use cells as xlabel in stackedplot

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

Adam Danz
Adam Danz il 21 Ago 2020
Modificato: Adam Danz il 19 Nov 2020
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.

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by