Adding legend to a plot from an array

조회 수: 9 (최근 30일)
Moiz
Moiz 2015년 6월 20일
댓글: Tamil 2024년 4월 20일
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 ?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 6월 20일
편집: Azzi Abdelmalek 2015년 6월 20일
lengend(legStr)
  댓글 수: 3
Azzi Abdelmalek
Azzi Abdelmalek 2015년 6월 20일
use
legend(legStr(:))
Tamil
Tamil 2024년 4월 20일
Enter legend one space with starnames. Legend (starnames)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Kishor
Kishor 2022년 12월 19일
Add a legend to plot using the array starname

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by