Printing the figure to PDF in vector format and not bitmap
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Yash
el 10 de Nov. de 2024 a las 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 comentarios
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!