Rendering and image quality in MATLAB figures

匆匆过客 提交于 2019-11-28 07:03:53

In general, I let MATLAB choose which renderer is most appropriate, which means leaving the RendererMode property of the figure set to its default value of auto. A brief description of the current 'Renderer' options can be found here.

I'll address your two problems separately:

  • A "thick red line" in the contour plot: Without seeing the code you use to make the contour plot, or a screenshot, I can't help you much with this other than to point out that you can control aspects of how the contour plot renders by setting certain contour plot properties. For example, you can control the line width by setting the LineWidth property:

    [C, h] = contour(peaks(20), 10);  % Make a sample contour plot
    set(h, 'LineWidth', 3);           % Make the lines thicker
    
  • Figure "quality": The choice of renderer doesn't so much adjust the quality per se. The renderer generally influences the accuracy and speed of the graphics rendering as well as the rendering options available (i.e. lighting, transparency, etc.). If you want better quality images from your figures, I would suggest downloading the submission Myaa by Anders Brun on The MathWorks File Exchange. It allows you to create anti-aliased graphics in MATLAB. Here's a screenshot from the submission illustrating the improved figure quality:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!