Cropped off markers when exporting figures as PNG
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I have run into an issue where seemingly randomly - though probably only at the periphery of graphs, circular markers are cropped off leaving arcs when exporting to PNG. I've attached one example of code and produced figure below - I have not tested if any of the messing with the defaults is critical in producing this - just set them how I generally like my figures. I'm using OpenGL, which I believe is part of the problem since I don't recall having these issues when working on a hardware accelerated system. Running 9.2.0.556344 (R2017a) on Win7 64-bit i7 system with Intel HD 530 graphics - attaching sysinfo png.
Best regards,
/Jonas
%cropcircledemo.m set(0,'DefaultAxesFontsize',12); set(0,'DefaultLineLinewidth',2); set(0,'DefaultLineMarkersize',10);
x=[0.1009 0.1011 0.1020 0.1613 0.2339 0.3051 0.3654 0.4284 0.4901 0.5798 0.6720 0.7530 0.8240 0.1007]; y=[14.6900 14.8100 15.0500 15.2800 15.5200 15.7400 15.9300 16.1400 16.3300 16.6100 16.9100 17.1700 17.4000 14.6900];
figure(10); clf; plot(x,y,'o');
print cropcircledemo.png -dpng -r600
댓글 수: 0
채택된 답변
Michael Dombrowski
2017년 6월 29일
Your issue can be resolved by changing either the resolution (DPI) or the renderer.
Try the following code:
% do not use opengl
print cropcircledemo.png -dpng -r600 -painters
% use any other dpi
print cropcircledemo.png -dpng -r700
추가 답변 (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!