当涉及哪个渲染器用于MATLAB数字或什么时候重要时,我无能为力,但我遇到了一些重要的例子:

plot(0,0,'ko','markersize',50,'linewidth',8);

set(gcf,'renderer','opengl');

set(gcf,'renderer','painters');

左= OpenGL,右=画家:

5gE6x.png

LsOAj.png

(运行Windows 7 Professional和MATLAB R2015b)

是否有时候使用OpenGL渲染器产生比Painters更好的结果?一般来说,两个渲染器有何不同?

最佳答案 这些是我所知道的差异

> OpenGL是默认渲染器

> OpenGL允许绘制透明度,而Painter则不允许

>如果使用OpenGL时出现图形错误或者Matlab崩溃,请使用Painter

>选择Painter以postscript格式导出数字.使用OpenGL

当图形太复杂时,Matlab保存为Bitmap,你无法编辑它.

从Mathworks website (Scroll down to “renderer”):

‘opengl’ — OpenGL® renderer. This option enables MATLAB to access

graphics hardware if it is available on your system. The OpenGL

renderer displays objects sorted in front to back order, as seen on

the monitor. Lines always draw in front of faces when at the same

location on the plane of the monitor.

‘painters’ — Painters renderer. This option works well for axes in a

2-D view. In 2-D, the Painters renderer sorts graphics objects by

child order (order specified). In 3-D, the Painters renderer sorts

objects in front to back order. However, it might not correctly draw

intersecting polygons in 3-D.

有关使用OpenGL修复低级图形问题,请参阅此link.

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐