조건 : 일시 중지없이 루프를 실행하면 컬러 바가 그림의 약 50 %가 아닙니다. 중단 점을 넣고 계단식으로 실행하면 모든 색상 막대가 나타납니다. 나는 메모리 문제왜 Matlab 수치가 낮 으면 컬러 바가 반응하지 않습니까?
Warning: print2array generating a 46.1M pixel image.
This could be slow and might also cause memory
problems.
- Suever를 나타내는,이 colorbars 사라 졌어요 후 일부 안정성/메모리 문제
의사 코드
i=1; while (i < 3); figure('Visible', 'off'); hax=axes(); image('Parent',hax); % Do heavy computation here; see the warning below for it. a=rand(1,20000); b=rand(1,20000); C=rand(20000,20000); imagesc(a,b,C); colorbar(hax) %% Unsuccessful attempts %drawnow % does not help %pause(1) % does not help homedir=char(java.lang.System.getProperty('user.home')); % all systems filename=fullfile(home, sprintf('/Desktop/%d', i)); export_fig(filename, '-png', '-q101', '-a1', '-m1', ... '-CMYK', '-nocrop', '-dpng', hax); i=i+1; end
오류 메시지라고 생각합니다.
drawnow
colorbar
뒤에 오는 명령은 도움이되지 않습니다.
시스템 : 리눅스 우분투 16.04 64 비트
matlab에 : 2016a
하드웨어 :이 matlab에의 내부 문제
'colorbar'를 호출 한 후에'drawnow'를 넣으십시오. 문제는 일시 중지하지 않고 렌더러가 실제로 컬러 바를 화면에 그릴 시간이 없다는 것입니다. – Suever
실제로 문제를 보여주는 [mcve]를 알려주세요. 말 그대로 기본 '이미지'를 표시하지 않는 한 작성된 코드는 실행 불가능합니다. – Suever
실제 코드로 질문을 편집하는 것을 잊어 버린 것 같습니다. 의사 코드는 문제를 재현하지 않기 때문에 의사 코드를 원하지 않습니다. – Suever