- Opengl software - https://www.mathworks.com/help/matlab/ref/opengl.html
- Figure Properties(Renderer)- https://www.mathworks.com/help/matlab/ref/matlab.ui.figure-properties.html
lines of my plot appear grained (MATLAB R2021a)
4 次查看(过去 30 天)
显示 更早的评论
Hi, i plot a line and it appears grained.. I've tried to search about the problem but i can't find a solution.
I have an AMD RX 6800 gpu and Ryzen 7 5800x (new hardware).
I've tried also to insert this lines in the command window but nothing changed:
opengl hardware
set(gcf,'GraphicsSmoothing','on')
If i run my script on my laptop everithing is going well. I want to solve this problem on my new PC Desktop.
0 个评论
回答(1 个)
Simar
2024-5-8
Hi Francesco,
I understand that there is an issue with MATLAB plots looking grainy on a new desktop PC, while they display correctly on laptop. The issue with grainy appearance of lines in plots, despite attempting to enable hardware OpenGL and graphics smoothing, suggests the problem might be related to specific combination of hardware and software on new PC.
Here are several workarounds to further diagnose and potentially resolve the issue:
1. Verify MATLAB Version and Graphics Support:
Ensure MATLAB version is up to date as newer hardware might not be fully supported by older versions of MATLAB. Updating MATLAB to the latest version could resolve compatibility issues. Since the script runs smoothly on laptop, compare MATLAB version and graphics settings on both laptop and desktop. Differences in versions or settings could be contributing to the issue.
2. Test Different OpenGL Modes:
As mentioned, already tried opengl hardware hence it might be helpful to explicitly switch to software OpenGL mode to see if issue persists. This can help determine if the problem is related to the GPU or its drivers:
opengl software
If issue disappears in software mode, it is then mostly related to hardware acceleration. While software mode may offer a temporary workaround, it is slower and not a long-term solution.
3. Adjust Figure Properties:
Since already tried enabling graphics smoothing, another property to consider is the 'Renderer' property of the figure. Try setting it to 'painters' to see if it improves the appearance:
set(gcf, 'Renderer', 'painters');
Following these steps would help pinpoint the cause of grainy line appearance in plots and lead to an appropriate solution.
Please refer to the following documentation links-
Hope this helps!
Best Regards,
Simar
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!