Why export_fig won't work if code is run automatically?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I've created a script that will update graphs every hour and save them as .jpgs using export_fig. When I manually run the script, it all goes smoothly, but when I use a c-shell to run MATLAB, the .jpg created is scrunched with no plot (only the title and axis labels are there). My .csh looks like this:
#! /bin/csh
matlab -nodisplay -nodesktop -r "run /home/mmateling/realtime/capebird.m"
So the script runs, with no errors, but there must be something wrong with the way my .csh script runs and the export_fig code. I am by no means a unix or matlab expert, so any help would be greatly appreciated!
댓글 수: 0
채택된 답변
Image Analyst
2014년 1월 10일
I think export_fig grabs pixels from the display memory, though I could be wrong. I never would have tried to run it with the nodisplay option so that nothing is displayed. Is anything at all being saved, like whatever happens to be on your screen at the moment?
추가 답변 (1개)
Sean de Wolski
2014년 1월 10일
편집: Sean de Wolski
2014년 1월 10일
Did you drawnow() before exporting/printing?
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!