1
我想在矩阵中读取图中的特定单元格的方向。如何使用'乳胶箭头符号'在图中创建对角箭头?
在附图中,我可以创建左方向箭头,但我没有得到如何在西南方向插入对角箭头。
显然,latex arrow symbol工作正常的左箭头,右箭头,箭头向上和向下箭头,但未能为斜箭头。
在附图中我需要通过青色细胞向西南方向插入箭头。这个怎么做?
这里是我想剧本,
for row=1:size(data,1)
for col=1:size(data,2);
if data(row,col)==1
rectangle('Position',[col-0.5 row 1 1], 'FaceColor','y','EdgeColor','k', 'LineWidth', 0.1)
text(col-0.95,row+0.6,'\leftarrow', 'fontsize', 6);
elseif data(row,col)==2
rectangle('Position',[col-0.5 row 1 1], 'FaceColor','c','EdgeColor','k', 'LineWidth', 0.1)
text(col-0.95,row+0.6,'\swarrow', 'fontsize', 6);
else
rectangle('Position',[col-0.5 row 1 1], 'FaceColor','w','EdgeColor','k', 'LineWidth', 0.1)
end
end
set(gca,'Visible','off')
end
编辑: Annotation
选项会增加复杂性,需要为每一个问题箭头的位置。如果可以使用乳胶箭头符号,问题会变得更容易。
你考虑到刚刚绘制矢量而不是使用Latex文本呢? – Bernhard
不,我不知道。你能再详细一点吗? – Mario
'annotation'可以做这项工作 –