how to use cells as xlabel in stackedplot

1 visualización (últimos 30 días)
Viktor G.
Viktor G. el 21 de Ag. de 2020
Editada: Adam Danz el 19 de Nov. de 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?

Respuesta aceptada

Adam Danz
Adam Danz el 21 de Ag. de 2020
Editada: Adam Danz el 19 de Nov. de 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.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by