Unable to see figures
이전 댓글 표시
I am using MATLAB R2022b Update 2 (9.13.0.2105380) 64-bit (maci64)
I prefer to use matlab on my mac via the command line through terminal.
In the past I used to run matlab using 'matlab -nojvm' but eventually it no longer supported figures.
Later, I used 'matlab -nodesktop' to do the same. I used this successfully as recently as ver R2021a. No difficulties plotting or using figures.
However, since upgrading to R2022b, I can no longer see figures. The commands 'plot' and 'figure' yield no errors, no messages -- and no figures either.
Any clues on how to get the figures to come back under -nodesktop option?
답변 (1개)
Aashita Dutta
2023년 1월 9일
Hello Willy,
I understand that you are unable to see figures using ‘plot’ or ‘figure’ commands using ‘matlab -nodesktop’ command to open MATLAB in mac machine.
Please find below couple of ways to resolve this:
1. From the system prompt, set the $DISPLAY environment variable:
setenv DISPLAY :0.0
matlab
OR
2. Set the DISPLAY as you start MATLAB:
matlab -display :0.0
Please find below some MATLAB Answers posts for further information:
- MATLAB Figures not appear when starting MATLAB from terminal on Mac OS- https://www.mathworks.com/matlabcentral/answers/99976-why-does-the-matlab-desktop-and-or-matlab-figures-not-appear-when-starting-matlab-from-the-terminal
- Figures won’t come up after using plot: https://www.mathworks.com/matlabcentral/answers/7481-figure-won-t-come-up-after-using-plot
Hope that helps.
댓글 수: 7
Willy Wong
2023년 1월 9일
Aashita Dutta
2023년 1월 11일
Hi Willy,
Thank you for your response!
You may refer to following MATLAB Answers posts and MathWorks documentation links for starting the MATLAB from MaC OS:
- https://www.mathworks.com/matlabcentral/answers/442969-how-do-i-run-matlab-from-the-mac-terminal#:~:text=type%20on%20terminal%3A%20cd%20%2FApplications,type%20on%20terminal%3A%20.%2Fmatlab
- https://www.mathworks.com/matlabcentral/answers/16407-can-i-use-matlab-from-the-terminal-command-line-in-os-x
- https://www.mathworks.com/help/matlab/matlab_env/start-matlab-on-macintosh-platforms.html
- https://www.mathworks.com/help/matlab/ref/matlabmacos.html
There are also some MATLAB Answers post related to figure not showing up, Please refer to the following links:
- https://www.mathworks.com/matlabcentral/answers/102129-why-do-my-figure-plot-and-other-graphics-windows-do-not-show-up
- https://www.mathworks.com/matlabcentral/answers/96507-why-do-figure-windows-disappear-behind-the-matlab-window-in-r14sp3-on-a-mac-os-x
Hope that helps!
Willy Wong
2023년 1월 11일
Denis Ridzal
2023년 3월 4일
None of the recommendations work for me either. Similar to @Willy Wong, I can open figures from the command line environment in older versions of Matlab. With 2022b, this is no longer possible. Is there an update on this issue? Opening figures from the command line environment is a critical feature.
Ivan Abraham
2023년 3월 28일
Same issue here.
Brandon Lopez
2023년 8월 28일
편집: Brandon Lopez
2023년 8월 28일
Same here!
Has anyone solved this issue? :(
Walter Roberson
2023년 8월 28일
Please check
which -all plot
and report the answers back to us.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!