Adding legend to a plot from an array

31 visualizaciones (últimos 30 días)
Moiz
Moiz el 20 de Jun. de 2015
Comentada: Tamil el 20 de Abr. de 2024
Ive got iD directories, iF files per directory and iS data sets per files. To extract the data I build an array dataset(:,iD,iF,iS) and also build a legend string with the corresponding names of the directory,file and data set just like legStr{iD,iF,iS}. Then I loop over the directories times the files times the data sets and plot it all in one figure. How can I use my legStr cell array to create a legend on this figure ?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 20 de Jun. de 2015
Editada: Azzi Abdelmalek el 20 de Jun. de 2015
lengend(legStr)
  3 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 20 de Jun. de 2015
use
legend(legStr(:))
Tamil
Tamil el 20 de Abr. de 2024
Enter legend one space with starnames. Legend (starnames)

Iniciar sesión para comentar.

Más respuestas (1)

Kishor
Kishor el 19 de Dic. de 2022
Add a legend to plot using the array starname

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by