Error when saving figure with linux command line
조회 수: 8 (최근 30일)
이전 댓글 표시
Receiving an error when I try and save a figure as a png. See traceback below. Calling matlab from a python script with -batch flag.
Error using validate (line 166)
Printing of uicontrols is not supported on this platform.
Error in print (line 67)
pj = validate( pj );
Error in saveas (line 181)
print( h, name, ['-d' dev{i}] )
Error in NavErrPlotsLN25X (line 238)
saveas(figH,fullfile(uutData.ftp(1).folder,figFileName),'png');
Error in NavErrPlotsProgramSwitch (line 42)
statusLog = NavErrPlotsLN25X(uutData,config,statusLog);
Error in FTPReviewWeb (line 51)
log = NavErrPlotsProgramSwitch(uutData,config,log);
댓글 수: 0
답변 (1개)
Jan
2022년 4월 26일
편집: Jan
2022년 4월 26일
In batch mode, Matlab does not support interactive GUI elements.
How do you save the figure as PNG? See: https://www.mathworks.com/help/matlab/ref/print.html#d123e1146812
print('-noui', ...)
댓글 수: 1
Ruben Krueger
2023년 12월 21일
In my use case, I need the buttons because their labels have critical information, but I don't need their functionality, of course. I am having the same issue as above when trying to save a figure in a Matlab executable. How can print with the UI?
참고 항목
카테고리
Help Center 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!