参考博客https://blog.csdn.net/u011650143/article/details/78924481
>> opengl hardware
>> opengl('OpenGLLineSmoothingBug',1)
>> opengl('OpenGLWobbleTesselatorBug',1)
>> opengl('OpenGLBitmapZbufferBug',1)
参考MathWorks官方关于图形问题的讨论:https://cn.mathworks.com/matlabcentral/answers/157894-resolving-low-level-graphics-issues-in-matlab
-----------------------------------------------------------
问题描述:之前困扰了我很久,为什么我升级到Matlab2016等高版本以后,发现plot绘图不能显示图线,而且图形很刺眼,有较严重的锯齿现象。折腾了很久一直没有找到问题,然而我换其他电脑装则没有这个问题,啊,明白了,肯定是我的电脑或者系统的问题。最后发现涉及到图形显示问题,那一般就是显卡问题了,果不其然,更新了NVIDIA驱动后问题解决了。
发现matlab 里进行图形渲染的OpenGL实现,有三种方式:硬件加速( hardware-accelerated
),基本硬件加速(basic hardware-accelerated
)以及软件实现(software
)。默认情况下matlab尝试使用硬件加速实现(若图形硬件支持,我的是NVIDIA 1G独显,所以我的MATLAB2016默认去调用硬件出现故障,升级驱动即可解决)。当没有硬件支持的时候,当出现各类图形问题时,可以切换到软件实现或者基本硬件加速实现。但这些实现不支持一些高级图形特性。
为了检查我电脑matlab以何种实现,在matlab命令窗口键入命令:opengl info
,发现使用了软件渲染,硬件支持等级写的时none(已知的图形驱动程序有问题)。
To switch from hardware to software OpenGL, start MATLAB from the command prompt or terminal on your system using this command:
matlab -softwareopengl
To set your preferences so that MATLAB always starts with software OpenGL on this computer, execute this command at the MATLAB command line:
opengl('save','software')