Filter löschen
Filter löschen

Cannot plot anything in Matlab running in Ubuntu 22.04.01

21 Ansichten (letzte 30 Tage)
Hi all,
I have now tried several things but nothing is working for me.
I cannot plot even the simplest things in Matlab 2023a on Ubuntu 22.04
Every other code I tried works fine and my GPU is being used fine, so I think it is unlikely that this is a problem with my graphics drivers.
Here is an example:
>> plot(rand(1,100))
Output argument "val" (and possibly others) not assigned a value in the execution with "get" function.
Error in matlab.graphics.shape.internal.ScribeStackManager/findLayer
Error in matlab.graphics.shape.internal.ScribeStackManager/getLayer
Error in newplot (line 83)
ax = gca(fig);
Error in matlab.graphics.internal.newplotwrapper (line 11)
axReturn = newplot(varargin{:});
Output argument "val" (and possibly others) not assigned a value in the execution with "get" function.
Error in matlab.graphics.shape.internal.ScribeStackManager/findLayer
Error in matlab.graphics.shape.internal.ScribeStackManager/getLayer
Error in matlab.graphics.shape.internal.ScribeStackManager/getDefaultCamera
Error in matlab.graphics.annotation.internal.getDefaultCamera
Error in matlab.graphics.controls.internal.PostUpdatePlugin.doCacheLoad
Error in matlab.graphics.controls.internal.PostUpdatePlugin>@()matlab.graphics.controls.internal.PostUpdatePlugin.doCacheLoad(canvasParent)
Output argument "val" (and possibly others) not assigned a value in the execution with "get" function.
Error in gcbf (line 17)
[~, fig] = gcbo;
Error in closereq (line 12)
if isempty(gcbf)
So far I have tried solutions suggested in various places but nothing has worked.
Here is some more info:
>> opengl info
Version: '4.6.0 NVIDIA 535.129.03'
Vendor: 'NVIDIA Corporation'
Renderer: 'NVIDIA GeForce RTX 4090/PCIe/SSE2'
MaxTextureSize: 32768
Visual: 'Visual 0x27, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 8 samples)'
Software: 'false'
HardwareSupportLevel: 'full'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {401×1 cell}
MaxFrameBufferSize: 32768
>> version -java
ans =
'Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode'
  2 Kommentare
Avni Agrawal
Avni Agrawal am 20 Nov. 2023
Hi, have you tried re-installing the MATLAB application?
Antonios Asiminas
Antonios Asiminas am 21 Nov. 2023
Thank you for your reply. I do not feel this is the issue. This is brand new full installation (all default toolboxes) of MATLAB. The folders with custom functions and scripts, do not cause any similar problem when I include them in a computer running MATLAB on windows.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 20 Nov. 2023
Verschoben: Walter Roberson am 21 Nov. 2023
As an experiment, try
restoredefaultpath; rehash toolboxcache
and then try plotting.
If it works, then some function in one of the non-Mathworks folders on your path is conflicting with MATLAB. In particular the error message hint you might have a stray get.m file that is not supplied by Mathworks.
  1 Kommentar
Antonios Asiminas
Antonios Asiminas am 21 Nov. 2023
Verschoben: Walter Roberson am 21 Nov. 2023
Ok. This fixed it but I do not now why....I took a note of all the additional folders with custom scripts and functions I had previsouly included in the path, and I added them again, and now plotting is fine....What is even more bizzare is that when I added all main custom script/function folder and subfolders in the path the problem reappeared but when I went and added folders one by one to see what was causing the issue, I ended up adding all of them without any problem at all...all and all, thank you very much for the help! Unfortunatelly, I have not come wiser out of this :-/

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by