久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

matlab繪圖中l(wèi)egend的終極用法

 書劍閣2013 2014-07-22

基本數(shù)據(jù):

data = rand(25)+repmat(1:25,25,1);
H = plot(data);

基本用法:

legend({'str1','str2','strn'});

高級用法1:指定legend顯示的位置:

legend({'str1','str2','strn'},1);

legend({'str1','str2','strn'},2);

legend({'str1','str2','strn'},'Location','SouthEast');

可選的位置很多:

North:Inside plot box near top
South:Inside bottom
EastI:nside right
West:Inside left
NorthEast:Inside top right (default)
NorthWest:Inside top left
SouthEast:Inside bottom right
SouthWest:Inside bottom left
NorthOutside:Outside plot box near top
SouthOutside:Outside bottom
EastOutside:Outsideright
WestOutside:Outside left
NorthEastOutside:Outside top right
NorthWestOutside:Outside top left
SouthEastOutside:Outside bottom right
SouthWestOutside:Outside bottom left
Best:Least conflict with data in plot
BestOutside:Least unused space outside plot

通常,,用'Best‘比較不錯

高級用法2:指定顯示某幾條曲線的legend:

方法1:復(fù)雜到吐血

例如你有25條曲線,想顯示其中1,,6,,11,16,,21的legend,,則

for i = [2:5 7:10 12:15 17:20 22:25]
     set(get(get(H(i),'Annotation'),'LegendInformation'),'IconDisplayStyle','off');
end
legend('1','6','11','16','21');

方法2:簡單到郁悶

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

高級用法3:legend橫排

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

高級用法4:不顯示方框:

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

參考文獻(xiàn)

http://www./access/helpdesk/help/techdoc/creating_plots/braliom.html

doc legend

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點,。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報,。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多