Plot does not pop up?
Show older comments
Hi all,
I am having a weird problem with Matlab that I have never experienced before, and have no idea what the underlying reason could be because it does not generate any error at all.
Basically I try "plot(1,2)" and nothing happens, no figure pops up. However, the command line is kept busy, as if the code enters into an infinite loop. I am using 64 bit Linux and 2014b. I would really appreciate if somebody could direct me towards the solution or give an idea about what the problem could be.
Thanks,
17 Comments
Image Analyst
on 2 Mar 2015
Does this work:
plot(1:10)
Tunc Kayikcioglu
on 3 Mar 2015
Joseph Cheng
on 3 Mar 2015
Edited: Joseph Cheng
on 3 Mar 2015
I'd check to see if there is another function accidentally called plot() that is being used instead of the built-in matlab function. i think the command to do this is:
which plot -all
which will return all instances inside the search path for plot. All instances should be located in the matlab install path + whatever tool boxes are installed. If there is an offending item not from matlab, i'd remove (save a backup because unless someone did it as a joke it was done for a reason).
~J
Tunc Kayikcioglu
on 3 Mar 2015
Edited: Walter Roberson
on 11 Oct 2016
per isakson
on 3 Mar 2015
Try this line
fh=figure;plot(1,2,'d')
Tunc Kayikcioglu
on 3 Mar 2015
per isakson
on 3 Mar 2015
Do you have some strange configuration of multiple screens? What does this return?
>> plot(1,2)
>> fh = findall( 0, 'Type', 'figure' );
>> get( fh, 'Position' )
per isakson
on 3 Mar 2015
and this
>> get(fh,'Visible')
ans =
on
Tunc Kayikcioglu
on 3 Mar 2015
Edited: Walter Roberson
on 11 Oct 2016
per isakson
on 3 Mar 2015
A figure seems to be created, but it not displayed. The position looks okay. What does
get(fh, 'Visible' )
say?
per isakson
on 3 Mar 2015
R2014b has a new graphic system. I use R2013b. Show all the properties and try to understand if there is a value, which might explain why the figure is not shown.
per isakson
on 3 Mar 2015
Edited: per isakson
on 3 Mar 2015
To be absolutely sure
delete(gcf) % repeat until you are sure there are no figures
and run again
figure; fh=findall(0, 'Type', 'figure'), get(fh, 'Position')
Joseph Cheng
on 3 Mar 2015
Edited: Joseph Cheng
on 3 Mar 2015
From what i can piece together is:
- when you type in "figure()" an empty figure appears (that you can see).
- then if you try to plot(), Matlab hangs up and locks up the interface as if it is trying to process a long process. That is why i thought possibly there is another plot function being used but parsing out what you show it doesn't look like it.
Per isakson if Tunc sees the empty figure i'm not sure it's completely a graphics issue.
Tunc, when you plot and it gets stuck, does the ctrl+ 'c' shortcut to break out of what is running work? it should pop up an error in what routine it stopped inside of. maybe that error should be sent to matlab support.
Just curious, does any other graphic functions work? Like surf(), bar(), mesh(), plot3()....
Tunc Kayikcioglu
on 3 Mar 2015
per isakson
on 4 Mar 2015
Edited: per isakson
on 4 Mar 2015
@Joseph, Tunc writes "and nothing happens, no figure pops up" and "Did not work, either. No figure popped up."
@Tunc, I'm might be barking up the wrong tree and I'm a bit lost. You write "the command line is kept busy, as if the code enters into an infinite loop." and "ctrl+c does not work".
- How do you bring Matlab out of this condition? Do you restart Matlab by force?
- Does figure; fh=findall(0, 'Type', 'figure'), get(fh, 'Position') create a visible empty figure? I assume it does.
- Have you checked the cpu (and memory) usage when Matlab is in this "infinite loop condition"? I assume that Linux has a tool similar to Windows Task Manager.
- And you have restarted the system? On Windows we solve most weird problems by restarting Windows:-(
- "I have never experienced before" Did plot work as expected on R2014b (Linux)? What has changed in your system between "before" and now?
- "Invoking any other graphic function results in the same situation." Contact tech-support, reinstall Matlab
Tunc Kayikcioglu
on 4 Mar 2015
I had the same problem. However, I've discovered that xorg driver was not properly installed (you can check it by typing "inxi -Fxz").
I re-installed "xserver-xorg-video-intel" (in my case the graphics card is intel) and reconfigured xserver-xorg, and now matlab works properly without softwareopengl option.( link of the solution )
Hope this helps you,
Bora
Answers (2)
Kai-Uwe Storek
on 26 Jul 2016
4 votes
Same problem here after last upgrade to Linux 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux.
In addition: "opengl info" (even with -nosoftwareopengl flag) ended with a timeout exception.
Workaround - start matlab with -softwareopengl option.
1 Comment
Hao Cui
on 3 Aug 2016
Same problem in 2016a on latest Arch Linux. It does works with software OpenGL enabled.
CJ
on 15 Jun 2016
I recently had the very same problem. It started after an automatic update on Fedora 23. I may open empty figures but if I (for example) write
peaks(20)
on the command line MATLAB enters "Busy" mode and it is impossible to stop the operation.
3 Comments
Tunc Kayikcioglu
on 15 Jun 2016
CJ
on 1 Jul 2016
The problem is reproducible. I reinstalled Fedora (config-4.2.3-300.fc23.x86_64) and when I upgraded to config-4.5.7-200.fc23.x86_64 MATLAB crashes when I try the most basic plot commands.
I did nothing else (except install Google chrome etc.) before I downloaded MATLAB. I.e. I did not install the supported compilers that the installation wizard was prompting for.
MATLAB works fine in every other way.
Walter Roberson
on 1 Jul 2016
Edited: Walter Roberson
on 1 Jul 2016
CJ, which graphics card do you have installed, and which graphics driver version do you have installed?
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!