首页 > 编程知识 正文

matlab删除多余例,matlab中画如何去除分割线

时间:2023-05-03 23:47:34 阅读:276610 作者:4749

xq的问题,想把Matlab的legend

点形状不想要多余的线,即将2-4的legendline去除。

解决:

line_fewer_markers是针对线的legendline off,对于点的legend off,我用的比较土的解决方法。即点位偏移一点点,形成线,再用作者的这个line_fewer_markers.m代码。

xx=-7:-6;

yy=polyval(P,xx);

plot(xx,yy,'-k','Linewidth',2)

hold on

line_fewer_markers([-6.488,-6.489],[-40.829 ,-40.828],9,'color','r','marker','^','MarkerFaceColor','r','spacing','curve','LegendLine','off');

hold on

line_fewer_markers([-6.455,-6.456],[-40.097 ,-40.096],9,'color','b','marker','s','MarkerFaceColor','b','spacing','curve','LegendLine','off');

hold on

line_fewer_markers([-6.376,-6.377],[-39.691 ,-39.690],9,'color','b','m极速赛车五码一期全天计划数据olor','b','marker','s','MarkerFaceColor','b','spacing','curve','LegendLine','off');

hold on

line_fewer_markers([-6.376,-6.377],[-39.691 ,-39.690],9,'color','b','marker','o','MarkerFaceColor','b','spacing','curve','LegendLine','off');

legend('降水线','120m处水','24m处水','干扰井水','Location','SouthEast')

最后结果

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。