FIGURE2PDF exports the current MATLAB figure to a PDF file.
This function is useful for preparing high-quality graphic files for research papers.
Ildeberto de los Santos Ruiz (2020). figure2pdf (https://www.mathworks.com/matlabcentral/fileexchange/71053-figure2pdf), MATLAB Central File Exchange. Retrieved .
Help information added.
Added '-painters' to save PDF in vector format. Thanks to Jaime Martins for the suggestion.
Minor bugs were fixed.
Now the function can be called without arguments, because it assigns a file name by default. It is also possible to open the PDF file at the end.