[繪圖] 怎麼改變subplot中legend的orientation
我想要畫包含6個subplot直條圖的圖
排列方式為[3 2]
因為A4紙的寬度限制
leged想要放在這六張圖的最下方
並且是水平排列的
今天Google了好久終於找到一個方法可以控制legend的位置
% Construct a Legend with the data from the sub-plots
hL = legend({'1st Ranked','2nd Ranked','3rd Ranked','4th Ranked','5th
Ranked'});
% Programatically move the Legend
newPosition = [0.2 0.0 0.475 0.1];
newUnits = 'normalized';
set(hL,'Position',newPosition,'Units', newUnits);
legend('boxoff');
但是legend 的orientation預設為垂直
要怎麼改才能讓orientation變為horizontal呢?
新手發問 請問怎麼解決呢 謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.45.227.216
→
08/25 02:26, , 1F
08/25 02:26, 1F
→
08/25 02:26, , 2F
08/25 02:26, 2F