对于legend函数,我觉得示例更形象,关于解释网上给出的都很完善,或者matble中help legend哦
legend() 将图例添加到图形
x = -pi:pi/20:pi; y1 = sin(x); y2 = cos(x); plot(x,y1,'-ro',x,y2,'-.b') legend('sin(x)','cos(x)') |
图例1 |
对于legend函数,我觉得示例更形象,关于解释网上给出的都很完善,或者matble中help legend哦
legend() 将图例添加到图形
x = -pi:pi/20:pi; y1 = sin(x); y2 = cos(x); plot(x,y1,'-ro',x,y2,'-.b') legend('sin(x)','cos(x)') |
图例1 |