【发布时间】:2012-06-21 21:58:57
【问题描述】:
我想在子图中添加图例,但仅适用于某些图。 这是我的代码:
for j = 1:length(FL)
for i = 1:length(index_list)
pos=pos+1;
subplot(size(FL,1),length(index_list), pos)
legend(num2str(ms_list(i)), 'Location', 'NorthOutside');
imagesc(imread(FL{j,:},index_list(i)))
if i==1
legend(FL(j),'Location', 'WestOutside')
end
end
子图包含从多帧 .tif 文件中提取的帧。所需帧的索引位于 index_list(列)中。所需文件的路径位于 FL(行)中。我想在图中添加的是每行左侧的文件名和绘制的每个图像的帧索引。 ms_list 包含以毫秒为单位的等效索引,这实际上是我想要显示的。 这样做会在循环中的每个段落返回“Plot empty”。
有什么想法吗?
谢谢
JC
【问题讨论】:
标签: matlab for-loop legend matlab-figure subplot