Cannot plot anything in Matlab running in Ubuntu 22.04.01

21 次查看(过去 30 天)
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 个评论
Antonios Asiminas
Antonios Asiminas 2023-11-21
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.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2023-11-20
移动:Walter Roberson 2023-11-21
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 个评论
Antonios Asiminas
Antonios Asiminas 2023-11-21
移动:Walter Roberson 2023-11-21
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 :-/

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

标签

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by