当前位置:网站首页>matlab legend 水平放置

matlab legend 水平放置

2020-12-08 11:09:14 faithyiyo

1)legend横排

hl = legend(H([1 6 11 16 21],'1,'6','11’,'16','21');

set(hl,'Orientation','horizon')

2)不显示方框:

hl = legend(H([1 6 11 16 21],'1,'6','11’,'16','21');

set(hl,'Box','off');

3)其他位置参考 help

plot(AQR,'-s', 'LineWidth',1,'Color',[75,172,198]./255,'MarkerSize',5,'MarkerFaceColor','g');
hold on
plot(BQR,'-V','LineWidth',1, 'Color',[128,100,162]./255,'MarkerSize',5,'MarkerFaceColor','c');
plot(CQR,'-x', 'LineWidth',1, 'Color',[192,80,77]./255, 'MarkerSize',5,'MarkerFaceColor','m')
hold off
grid on
set(gca,'GridLineStyle','-.','GridColor','k','GridAlpha',0.3,'LineWidth',1.3);
set(gca, 'XTick',[1 2 3 4 5] ); % X轴的记号点
set(gca, 'XTicklabel',{'Lv1','Lv2','Lv3','Lv4','Lv5'}); % X轴的记号
h1 = legend('Location','northoutside','AQR','BQR','CQR');
set(h1, 'Orientation', 'horizon')
set(h1, 'Box', 'off')
xlabel('Noise Level')
ylabel('QR')

 

版权声明
本文为[faithyiyo]所创,转载请带上原文链接,感谢
https://www.cnblogs.com/faithyiyo/p/14101439.html