Matlab 2017b plotting error.
Ältere Kommentare anzeigen
I can't plot anything. My error is:
No appropriate method, property, or field 'Type' for class 'matlab.graphics.GraphicsPlaceholder'.
Error in newplot>ObserveAxesNextPlot (line 134)
if ~strcmp(fig.Type,'figure')
Error in newplot (line 89)
ax = ObserveAxesNextPlot(ax, hsave);
Error in blabla (line 11)
plot(x,e);
Help me, please.
4 Kommentare
Image Analyst
am 13 Jan. 2018
Please attach blabla.m and any data files that it reads in so we can reproduce your problem. http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
Catalin Tudoran
am 13 Jan. 2018
Bearbeitet: Catalin Tudoran
am 13 Jan. 2018
Jan
am 13 Jan. 2018
@Catalin: Please use the "{} Code" button to format code. This is nicer than inserting blank lines.
Star Strider
am 13 Jan. 2018
Your code, as you posted it, runs without error for me in R2017b.
Akzeptierte Antwort
Weitere Antworten (3)
Felix Bernreuther
am 18 Mär. 2018
I've had the same Problem.
Solution (Linux): If you're using Linux open Matlab by typing "matlab -softwareopengl" in the shell.
Notice:
"matlab" -> no Plot is possible Error : "if ~strcmp(fig.Type,'figure')[...]"
"matlab -softwareopengl" -> plotting possible without any errors.
If there is some Expert who knows what's this about I'd like to hear his explanation.
2 Kommentare
mn
am 4 Apr. 2018
I just had this problem after fresh installation of 2018a on Ubuntu 14.04, and this worked. I'd be curious to hear that expert's explanation, too.
Sze Yu Chan
am 8 Feb. 2018
0 Stimmen
I also have the same problem using 2017b and Windows 10.
2 Kommentare
Jan
am 8 Feb. 2018
Please post the details: Did it work before you have changed anything? If so, what has been changed? Did you exclude that a user-defined function shadows a built-in function? Remove all user-defined folders from the path and run the code again.
Did the code run successfully under a Matlab version < R2014b, when the graphics engine has been saved?
I guess, that it would take some minutes only to find the reason using the debugger. But I do not have access to your or Catalin's computer. Therefore you have to use the debugger by your own, or provide as many details as possible in the hope, that some useful information are contained also. "I have the same problem" does not allow to help you and it does not support the OP.
Sze Yu Chan
am 9 Feb. 2018
I have used MATLAB for the first time. I just installed 2017b and haven't changed anything. I tried to use debugger and had the same result as the asker's. I tried other functions that draw graphics like bar(), and still reported error. Thus I uninstall 2017b and install 2016b. Now it works.
Steven Lord
am 8 Feb. 2018
0 Stimmen
My suspicion is that somehow the variable x has become a matlab.graphics.GraphicsPlaceholder. The error message you posted occurs on line 11 of your code, but your plot call is on line 7 of the code you posted. What's in the four lines you left out? Did you perhaps use findobj or findall on one of those four lines, assigning the output of that call to x?
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!