2013-07-15 69 views
0

我用白色輪廓線做了contourfm圖。電影重畫輪廓線

我使用了'LineColor', 'white',但在電影中,白線在每張圖像之後傳播,而不是重繪。圖像上的顏色自動重新繪製。我究竟做錯了什麼?

另外,查看圖像時,它在左上角顯示爲小。之前的類似腳本不會導致此問題。有人知道爲什麼

% Create movie 
nFrames = 893; % Number of frames 
for k = 1:nFrames % Create movie 
    % Eqdconic script  
    % Define figure and axes 
    fg1 = figure(1); 
    axesm('MapProjection','eqdconic', 'MapParallels', [], 'MapLatLimit',[-79.625 -59.625],'MapLonLimit',[190.625 250.625]) 
    framem on; gridm on; mlabel on; plabel on; hold all; 

    % Plot data 
    frame = dataSST_movie(:,:,k); 
    image = contourfm(Y,X,frame, 'LineColor', 'white'); % Change contour lines to white 

    mov(k) = getframe(gcf); 
end 

close(gcf) 

% % Save as AVI file 
movie2avi(mov, 'SST_20110101to20130611_0.25grid.avi', 'compression', 'none', 'fps', 4); 

image = contourfm()部分是我所說的;有沒有我需要使用的一些命令,如redraw

回答

0

只需在end之前使用clf即可。至於大小問題,請查看MapLatLimit和MapLonLimit。如果他們是正確的,它應該工作。