plot a cell array
3 次查看(过去 30 天)
显示 更早的评论
hello , can you please help me about plotting a cell array and use the 1st column as a nae for each line ? for example my cell is this
0 个评论
回答(1 个)
Guillaume
2019-1-30
Assuming that nae means name and that's what you want the legend to show for each row:
hlines = plot(cell2mat(yourcellarray(:, 2:end))'); %have to transpose as plot plots columns
[hlines.DisplayName] = yourcellarray{:, 1};
legend('show');
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!