필터 지우기
필터 지우기

Alteration of figure while saving

조회 수: 2 (최근 30일)
Idossou Marius Adom
Idossou Marius Adom 2021년 3월 23일
답변: Walter Roberson 2021년 3월 28일
Hello,
I constructed a graph with matlab and saved it as a .pdf file. However, I notice the pdf graph is missing elements that are present on the matlab output.
Here is the Matlab output
Here is the pdf output.
Here is my saving code.
h=gcf;
set(h,'PaperPositionMode','auto');
set(h,'PaperOrientation','landscape');
set(h,'Position',[50 50 1200 800]);
print(gcf, '-dpdf', 'Mypdf.pdf')
Can someone help ? I want my pdf graph to be exactly the Matlab output.
  댓글 수: 2
Walter Roberson
Walter Roberson 2021년 3월 24일
Would it be acceptable to make your ylim lower bound slightly negative, so that the dots were not exactly on the boundary?
I suspect that you are encountering depth considerations, which of the two left axes is on top of the other -- but it would not be surprising for pdf's idea of clipping to be just slightly different than MATLAB's.
Idossou Marius Adom
Idossou Marius Adom 2021년 3월 24일
You are right @Walter Roberson. It works. Thanks a lot.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2021년 3월 28일
Summary from above:
making the ylim slightly lower helped, as then there was no conflict between the point markers and the line for the border.

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by