Why does exportgraphics change the figure when exporting an area plot to png?
조회 수: 25 (최근 30일)
이전 댓글 표시
Hey everyone,
when I export my area-plot with exportgraphics at high resolutions (e.g. >300 dpi), it changes the plotted area like follows:
<-How it should look
<- How it actually looksthe export-command I am using is as follows:
exportgraphics(gcf,'figure.png','Resolution',300)
I am also plotting using yyaxis and tiled layout.
Does someone know a quick work-around or the reason why matlab does this? When manually exporting the figure the same issue ocurrs...
Best,
Johannes
댓글 수: 2
Dyuman Joshi
2023년 12월 11일
이동: Dyuman Joshi
2024년 1월 24일
From the documentation - "exportgraphics(obj,filename) saves the contents of the graphics object specified by obj to a file. The graphics object can be any type of axes, a figure, a standalone visualization, a tiled chart layout, or a container within the figure. The resulting graphic is tightly cropped to a thin margin surrounding your content."
Note the underlined part.
Options from FEX include export_fig
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!