Problem in cropping the pdf image in matlab
조회 수: 24 (최근 30일)
이전 댓글 표시
I have the following pdf image generated by matlab code. When I save this image as ''pdf'', it comes up with huge white portion that I really want to remove. I just keep the image portion only. Please somebody help me to get that. Pl see the attachment for image in ''pdf''.
댓글 수: 5
Ameer Hamza
2020년 6월 12일
"I thought that as pdf image has good resolution"
Not necessarily. You can save high-resolution png and jpg files too. pdf is useful if you want vector image; however, in that case, I prefer eps over pdf.
채택된 답변
Ameer Hamza
2020년 6월 12일
편집: Ameer Hamza
2020년 6월 12일
Try exportgraphics() in R2020a
t = linspace(0, 2*pi, 100);
r = linspace(0, 1, 100);
polarplot(t, r)
exportgraphics(gcf, 'test.pdf');
The output pdf file is attached.
For older releases
t = linspace(0, 2*pi, 100);
r = linspace(0, 1, 100);
polarplot(t, r)
export_fig(gcf, 'test.pdf');
export_fig is taken from here: https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig
댓글 수: 8
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!