how to use cells as xlabel in stackedplot

1 vue (au cours des 30 derniers jours)
Viktor G.
Viktor G. le 21 Août 2020
Modifié(e) : Adam Danz le 19 Nov 2020
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?

Réponse acceptée

Adam Danz
Adam Danz le 21 Août 2020
Modifié(e) : Adam Danz le 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.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by