Printing the figure to PDF in vector format and not bitmap
조회 수: 17 (최근 30일)
이전 댓글 표시
Hi all,
I am trying to print the figure into the PDF format. I have already set the renderer to Painters by:
fig1=figure(1)
fig1.Renderer='Painters'
but when I print the figure into PDF it still in bitmap and not vector. Anybody can assist me with the issue, please?
댓글 수: 0
답변 (1개)
Yash
2024년 11월 10일 19:06
Hello Aleksey,
To print a figure to a PDF in vector format, please consider the following suggestions:
1. Specify the graphics renderer as '-vector' while using the 'print' function as detailed in the documentation here: https://www.mathworks.com/help/matlab/ref/print.html#bukyb6e-1-renderer
2. Call the exportgraphics function. Specify an .eps, .pdf, or .emf file extension and set the 'ContentType' option to 'vector'. This function captures content that is tightly cropped around plots, and it does not create full-page output. For example, create a plot and save the contents of the current figure as a PDF file containing vector graphics.
plot([0 3 2 4 1]);
exportgraphics(gcf,"myplot.pdf","ContentType","vector")
3. Consider using this function available on File Exchange SaveFigure: Matlab vector figure export
I hope this accomplishes your task.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!