作者h10840206 (仕倖)
看板MATLAB
標題[討論] 視窗最大化儲存迴圈問題
時間Thu Jun 26 17:05:14 2014
快畢業了 迫在眉睫@@
小弟碰到一個要存到手軟的瓶頸(雖然Matlab進步很多了但還是想不通)
小弟有好幾張圖要輸出成tif檔,
但每次打開tif檔都發現不是全螢幕的圖檔…
但若是把Visible打開顯示的圖都是全螢幕的…
不知道是不是我saveas那附近寫錯了@@
小弟的迴圈寫法:
zn=['At' 'Ab' 'Bt' 'Bb' 'Ct' 'Cb' 'Dt' 'Db' 'Ec']; %名稱字串
for i=1:7
p=figure(i)
set(p, 'Visible', 'off');
.
.
.
h=plot(t, ri, 'r--');
xlabel('t', 'fontsize', 18);
ylabel('ri', 'fontsize', 18);
set(gca, 'fontsize', 18);
h3=legend(h,'1','2','3','4','5','6','7','8','9', 'Location', 'EastOutside');
set(h3, 'fontsize', 17);
grid on
set(gcf, 'Position', [0 0 2560 1600]);
saveas(p, ['RI' zn((2*i)-1) zn(2*i), 'tif');
end
非常感謝…!!!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.115.19.49
※ 文章網址: http://www.ptt.cc/bbs/MATLAB/M.1403773517.A.044.html
推 x03mp6:在saveas上面補一行 06/28 22:09
→ x03mp6:set(gcf,'paperpositionmode','auto') 06/28 22:09
→ h10840206:!!非常感謝 07/03 14:34