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?

Respuestas (1)

Aashita Dutta
Aashita Dutta el 9 de En. de 2023

0 votos

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:
  1. 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
  2. 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 comentarios

Willy Wong
Willy Wong el 9 de En. de 2023
Thank you kindly for taking the time to respond. Unfortunately I have already tried that (both methods) and setting the display environment does not help.
Willy Wong
Willy Wong el 11 de En. de 2023
Thanks for the compedium of results on this issue. Unfortunately none of them work.
For anyone else reading this, I have two machines
  1. Mac mini on MacOS Ventura 13.1
  2. Macbook pro on MacOS Ventura 13.1
The Mac mini runs MATLAB 2021b and there are no problems calling figures from the command line.
The MBP runs MATLAB 2022b and I cannot get the figures working. Previously on MATLAB 2021b there was no problem.
Denis Ridzal
Denis Ridzal el 4 de Mzo. de 2023
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
Ivan Abraham el 28 de Mzo. de 2023
Same issue here.
Brandon Lopez
Brandon Lopez el 28 de Ag. de 2023
Editada: Brandon Lopez el 28 de Ag. de 2023
Same here!
Has anyone solved this issue? :(
Walter Roberson
Walter Roberson el 28 de Ag. de 2023
Please check
which -all plot
and report the answers back to us.

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2022b

Etiquetas

Preguntada:

el 4 de En. de 2023

Comentada:

el 28 de Ag. de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by