Borrar filtros
Borrar filtros

removing edges (fractures) from lines

4 visualizaciones (últimos 30 días)
math_man_rob
math_man_rob el 21 de Feb. de 2022
Respondida: Neelanshu el 5 de Feb. de 2024
Dear fellows,
I try to export some plots as png files. But sadly all of them have these kind of edges within.
How can I remove these? Or avoid them?
  4 comentarios
math_man_rob
math_man_rob el 21 de Feb. de 2022
Shivam
Shivam el 6 de En. de 2024
Can you mention the settings done through "Property Inspector"?

Iniciar sesión para comentar.

Respuestas (1)

Neelanshu
Neelanshu el 5 de Feb. de 2024
Hi math_man_rob,
I understand from your query that you are interested in removing the edges in the exported plots.
The issue you're experiencing might be related to the renderer, if you switch to the "painters" renderer the issue goes away as shown in the image attached below. This option works well for axes in a 2-D view. Furthermore, you can use "GraphicsSmoothing" to reduce the appearance of jagged lines in an axes graphic.
%% Using opengl renderer
plot([-10 :0.01 : 10], [-10 :0.01 : 10].^2)
set(gcf, 'Renderer', 'opengl');
exportgraphics(gcf, 'filename.png', 'Resolution', 1200);
%% Using painters renderer
plot([-10 :0.01 : 10], [-10 :0.01 : 10].^2)
set(gcf, 'Renderer', 'painters', 'GraphicsSmoothing', 'on');
exportgraphics(gcf, 'filename.png', 'Resolution', 1200);
Kindly provide the code and configuration of "Property Inspector" used for generation of the above plots for further help.
Besides, a set of user contributed functions, available at the MATLAB Central File Exchange, can be used to assist you with exporting graphics:
A collection of 4 functions to make it easier to export figures for publication can be found at:
You may also refer to the following MATLAB Answers post to learn more about exporting images of publication quality:
Hope this helps.

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by