matlab legend 水平放置
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')
身体和灵魂必须有一个在路上!