figure won't come up after using plot

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 件のコメント

Andrew Newell
Andrew Newell 2011 年 5 月 15 日
This sounds like a problem for MATLAB Support.
Walter Roberson
Walter Roberson 2011 年 5 月 15 日
Some forms of remote access can cause this problem. How are you accessing?
Craig
Craig 2011 年 5 月 16 日
Walter, I am remote accessing my office computer through WebVPN. I am also using a laptop with a much smaller screen. I wish I could go to my office to see if I am having the problem there, but I am away from my office for the next week or so. However, I have had no other problems while remote accessing MATLAB.
Joao Melo
Joao Melo 2016 年 7 月 7 日
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
Frederika Sefaj 2020 年 4 月 13 日
just write figure(1), or howerver your figure was called

サインインしてコメントする。

 採用された回答

Craig
Craig 2011 年 5 月 21 日

0 投票

OK, I think I figured this out. When I start up MATLAB, I get this message and I'm guessing this has to due with the fact that I am remote accessing my office computer:
MATLAB only supports a screen depth of 16 or higher (Truecolor.)
MATLAB is running in headless mode. Figure windows will not be displayed.

2 件のコメント

Carmel Auerbach
Carmel Auerbach 2021 年 7 月 31 日
So how is this solved? Im also accessing my computer remotely and cant see the content of the figures
Moch Yasin
Moch Yasin 2023 年 11 月 18 日
This work for me too. thank you very much.

サインインしてコメントする。

その他の回答 (3 件)

Joao Melo
Joao Melo 2016 年 7 月 7 日

35 投票

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 件のコメント

John Ondov
John Ondov 2018 年 7 月 13 日
編集済み: John Ondov 2018 年 7 月 13 日
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
Akila Wijeratne 2020 年 3 月 6 日
Thank you, it worked!
Akshay Raju
Akshay Raju 2020 年 8 月 19 日
Awesome! Worked for me
Maymarie van den Heever
Maymarie van den Heever 2020 年 9 月 5 日
Same here, thx!
Jordan Willis
Jordan Willis 2020 年 12 月 10 日
Shout out to Joao. I almost punched a hole through my monitor trying to figure this out.
Arunima Sarkar
Arunima Sarkar 2021 年 4 月 18 日
Thank you JOAO..
michelle
michelle 2023 年 5 月 8 日
This worked for me, as well! Thank you!
Shivam
Shivam 2024 年 5 月 13 日
Worked for me as well just before i needed to submit my plot, you are a legend.
Thanks a lot
Mariami
Mariami 2025 年 9 月 25 日
Yay Worked!
I was getting ready to start crying :D
Mikolaj
Mikolaj 2025 年 10 月 18 日
Thank you so much
Vesa
Vesa 2026 年 1 月 15 日
This saved my day, thank you!

サインインしてコメントする。

Raady
Raady 2016 年 1 月 6 日
編集済み: Adam Danz 2026 年 4 月 22 日 13:11

4 投票

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 件のコメント

HABILA
HABILA 2018 年 2 月 23 日
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
Sean de Wolski 2011 年 5 月 16 日

0 投票

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 件のコメント

Craig
Craig 2011 年 5 月 16 日
I am running MATLAB on a PC. I tried the command you suggested and it didn't bring anything up.
Sean de Wolski
Sean de Wolski 2011 年 5 月 16 日
Call Tech Support and/or reinstall...
Terry
Terry 2025 年 9 月 18 日
This worked for me on MacOSX
No idea what this hidden figure thing is but dang it is annoying

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

質問済み:

2011 年 5 月 15 日

編集済み:

2026 年 4 月 22 日 13:11

Community Treasure Hunt

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

Start Hunting!

Translated by