figure won't come up after using plot
Mostrar comentarios más antiguos
I am fairly new to MATLAB. In the past I've been able to plot with no trouble. A figure would automatically come up after I used "plot". Now when I plot, no figure appears. Here's a simple example:
>> x = 1:10;
>> y = 3*x;
>> plot(x,y)
>>
Nothing comes up after this - no error message, no figure. I'm hoping this involves something simple like changing a setting. It worked fine just a week or two ago.
I tried using the "plottools" command, but that just brings up a blank figure window. It also gives me the following message in the command window:
>> plottools
Warning: OpenGL appears to be installed incorrectly.
> In opengl at 150
In getplottool>createOrGetSelectionManager at 71
In getplottool at 58
In plottools at 148
>>
I should also mention that I have been remote accessing my office computer for the last week and I can't recall if this problem started before or after. Though I wouldn't think that would be the cause of the problem. Any help would be greatly appreciated.
5 comentarios
Andrew Newell
el 15 de Mayo de 2011
This sounds like a problem for MATLAB Support.
Walter Roberson
el 15 de Mayo de 2011
Some forms of remote access can cause this problem. How are you accessing?
Craig
el 16 de Mayo de 2011
Joao Melo
el 7 de Jul. de 2016
Hello, could you solve this problem? I am having the same issue and I also started remotelly acessing my computer. How did you solve this? Thank you
Frederika Sefaj
el 13 de Abr. de 2020
just write figure(1), or howerver your figure was called
Respuesta aceptada
Más respuestas (3)
Joao Melo
el 7 de Jul. de 2016
35 votos
Ok, figured it out:
In one of the menus in the task bar there is one called plots (Home Plots Apps).
One the far rigth side, there are two options: Reuse figure or new figure.
1) Make sure it is in new figure 2) Restart Matlab 3) Your plot should open
11 comentarios
John Ondov
el 13 de Jul. de 2018
Editada: John Ondov
el 13 de Jul. de 2018
Joao's solution worked for me! I shall be making use of the drawnow command also as posted by Raady. Thank you both!
Akila Wijeratne
el 6 de Mzo. de 2020
Thank you, it worked!
Akshay Raju
el 19 de Ag. de 2020
Awesome! Worked for me
Maymarie van den Heever
el 5 de Sept. de 2020
Same here, thx!
Jordan Willis
el 10 de Dic. de 2020
Shout out to Joao. I almost punched a hole through my monitor trying to figure this out.
Arunima Sarkar
el 18 de Abr. de 2021
Thank you JOAO..
michelle
el 8 de Mayo de 2023
This worked for me, as well! Thank you!
Shivam
el 13 de Mayo de 2024
Worked for me as well just before i needed to submit my plot, you are a legend.
Thanks a lot
Mariami
el 25 de Sept. de 2025
Yay Worked!
I was getting ready to start crying :D
Mikolaj
el 18 de Oct. de 2025
Thank you so much
Vesa
el 15 de En. de 2026
This saved my day, thank you!
this answer helps when body checking this thread again.
if you are using the figure to plot in a loop, you have to use command as below , then you can see the figure.
drawnow;
1 comentario
HABILA
el 23 de Feb. de 2018
I also had the issue on running my old code ploting figures on loop using hold on, earlier it was working fine in MATLAB2008 and MATLAB2011 but it wasn't showing plot while running the same code in MATLAB2015. Now adding the command drawline its working fine. don't know the exact reason why... still thank you !
Sean de Wolski
el 16 de Mayo de 2011
Are you on Macintosh?
I have problems with MATLAB figures hiding behind things, a major shortcoming of MacOSX in general.
I wrote a script fgcf.m that is literally
figure(gcf)
So in the event that I plot something and it appears on a hidden figure that figure is surfaced.
3 comentarios
Craig
el 16 de Mayo de 2011
Sean de Wolski
el 16 de Mayo de 2011
Call Tech Support and/or reinstall...
Terry
el 18 de Sept. de 2025
This worked for me on MacOSX
No idea what this hidden figure thing is but dang it is annoying
Categorías
Más información sobre Graphics Performance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!