how can figure renderer be changed in Matlab 2025a?

조회 수: 388 (최근 30일)
Oleg S
Oleg S 2025년 6월 19일
댓글: Benjamin Kraus 2025년 9월 30일 20:06
Hi all,
I have recently updaged to 2025a from 2024b and immediately noticed a rather degraded figure quality. They look like some very pixelated plots from the 90s. Even the buttons on the axes within the figure are pixely and clipped. Matlab's main window looks fine.
rendererinfo tells me that the GPU (RendererDevice) used for figures is the internal Intel UHD Graphics, despite Windows expliciely set to use the dedicated NVIDIA GPU for Matlab 2025a.
gpuDevice is set to NVIDIA, I know this is for computing on gpu, not rendering figures, but it does tell me that Matlab can see the NVIDIA GPU.
I could not find any information on how to change the RendererDevice through commands or settings - is this a bug or a known issue?
Has anyone encountered this? Are there any solutions or workarounds?
Here's a screenshot from 2025a:
2025a version
and here's the same figure in 2024b:
Note the much smoother lines in 2024b and axes controls not clipped and not pixelated. Both figures were set to same size (Position) and screenshot on the same screen.
  댓글 수: 3
Oleg S
Oleg S 2025년 6월 24일
Hi Benjamin,
Thanks for quick answer!
Here's the output from rendererinfo:
GraphicsRenderer: 'WebGL'
Vendor: 'Google Inc. (Intel)'
Version: 'WebGL 2.0 (OpenGL ES 3.0 Chromium)'
RendererDevice: 'ANGLE (Intel, Intel(R) UHD Graphics (0x00004688) Direct3D11 vs_5_0 ps_5_0, D3D11)'
Details: [1×1 struct]
I have a workstation with one monitor connected with resolution 3440x1440. The laptop screen is 1920x1200. I do see the same issue regardless whether the external monitor is connected, or if I move the figure window between screens.
Scaling is 125% for native and 100% for external, both recommended by Windows. I have tried to set both to 125% and 100% (with Matlab restarts in-between) - no effect.
Setting linejoin to "chamfer" did something. Immediately after the figure rendered much smoother, including axes controls icons (!). However, I cannot replicate the effect. The figure looked fine on external monitor (with 100% scaling) but pixelated on the native screen (125% scaling). I then restarted Matlab and retraced, but now on my native screen it looks fine while on the external it's pixelated (no changes to either scaling).
The axes controls icons are pixelated as soon as the axes are created, even if the axes are empty.
I attach some test data.
The code I used for plotting is:
figure;
tlH = tiledlayout("horizontal", TileSpacing = "tight");
tlV(1) = tiledlayout(tlH, "vertical", TileSpacing = "none"); tlV(1).Layout.Tile = 1;
tlV(2) = tiledlayout(tlH, "vertical", TileSpacing = "none"); tlV(2).Layout.Tile = 2;
for snr = 1:2
for vv = 1:6
ax(vv, snr) = nexttile(tlV(snr));
hold(ax(vv, snr), "on");
grid(ax(vv, snr), "on");
plot(ax(vv, snr), data, '.-');
legend;
end
end
linkaxes(ax)
Tried with and without the marker.
Benjamin Kraus
Benjamin Kraus 2025년 9월 30일 20:06
I'm sorry I dropped the ball on this.
A colleague of mine has tried to reproduce this issue using the reproduction steps you mentioned, but they cannot reproduce the issue. They would like to learn more about this issue you are having.
If you are still having this issue and are interested in engaging directly with my colleague, please send me a message directly (via MATLAB Answers) with your email address (or perferred contact method), and I will give that information to my colleague.

댓글을 달려면 로그인하십시오.

답변 (2개)

Suman
Suman 2025년 6월 20일
편집: Suman 2025년 6월 20일
For plotting and MATLAB graphics, you cannot currently choose which GPU is used from within MATLAB. MATLAB makes a call to the system through OpenGL and uses the device that the system provides.
Please make sure you have NVIDIA Opengl drivershttps://www.nvidia.com/en-us/drivers/ installed on your system.
Then you can follow the steps mentioned here to switch the default graphics card: https://www.mathworks.com/matlabcentral/answers/322105-how-can-i-change-the-opengl-renderer
Hope that helps!
  댓글 수: 1
Walter Roberson
Walter Roberson 2025년 6월 20일
The question is specifically about R2025a. As of R2025a, OpenGL is no longer used and the opengl() command has no effect. From the release notes:
The following options for querying or setting the graphics renderer have no effect. MATLAB no longer uses OpenGL® technology to render graphics, and you no longer need to set the renderer in your graphics workflows.
Calling the opengl function has no effect. To query the graphics renderer, use the rendererinfo function instead.
The Renderer property of a figure has no effect.
The MATLAB startup options -softwareopengl, -nosoftwareopengl, -softwareopenglmesa, and -noopengl have no effect.
The opengl function, Renderer property, and startup options will be removed in a future release.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2025년 6월 20일
The figure renderer cannot be changed in R2025a. This is a fundamental change in R2025a, that OpenGL is no longer used and WebGL is used instead.
  댓글 수: 2
Benjamin Kraus
Benjamin Kraus 2025년 6월 20일
@Walter Roberson: Despite the wording of the question title, I think @Oleg S was asking whether you can change what graphics card is used by MATLAB, not the value of the Renderer property on figures.
Oleg S
Oleg S 2025년 6월 24일
To clarify, the figure renderer ("painters" etc) is not the issue. I did try to change them though, to no effect.
I suppose I was confused myself between the renderer device and the renderer, my bad.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품


릴리스

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by