Plot does not pop up?
이전 댓글 표시
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
Image Analyst
2015년 3월 2일
Does this work:
plot(1:10)
Tunc Kayikcioglu
2015년 3월 3일
Joseph Cheng
2015년 3월 3일
편집: Joseph Cheng
2015년 3월 3일
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
2015년 3월 3일
편집: Walter Roberson
2016년 10월 11일
per isakson
2015년 3월 3일
Try this line
fh=figure;plot(1,2,'d')
Tunc Kayikcioglu
2015년 3월 3일
per isakson
2015년 3월 3일
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
2015년 3월 3일
and this
>> get(fh,'Visible')
ans =
on
Tunc Kayikcioglu
2015년 3월 3일
편집: Walter Roberson
2016년 10월 11일
per isakson
2015년 3월 3일
A figure seems to be created, but it not displayed. The position looks okay. What does
get(fh, 'Visible' )
say?
per isakson
2015년 3월 3일
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
2015년 3월 3일
편집: per isakson
2015년 3월 3일
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
2015년 3월 3일
편집: Joseph Cheng
2015년 3월 3일
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
2015년 3월 3일
per isakson
2015년 3월 4일
편집: per isakson
2015년 3월 4일
@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
2015년 3월 4일
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
답변 (2개)
Kai-Uwe Storek
2016년 7월 26일
4 개 추천
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
Hao Cui
2016년 8월 3일
Same problem in 2016a on latest Arch Linux. It does works with software OpenGL enabled.
CJ
2016년 6월 15일
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
Tunc Kayikcioglu
2016년 6월 15일
CJ
2016년 7월 1일
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
2016년 7월 1일
편집: Walter Roberson
2016년 7월 1일
CJ, which graphics card do you have installed, and which graphics driver version do you have installed?
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!