Saving an image from a MATLAB plot causes a number of problems. Fonts are too small, lots of whitespace,low image quality etc.
This addresses all these issues.
after using plot (X,Y), simply call plotpub(h,xl,yl) from the main function.
xl,yl-x and y axis labels,
Additionally, you can specify the following optional input arguments:
file: output file name
w_inch: Width of the image in inches.
dpi: desired image resolution (determines the size of the file. There is always a tradeoff between file size and resolution)
life_size: if you need to adjust the magnification at which you display the figure in the document/presentation.
if you don't specify a filename, it will save a file called 'plotpic.tiff' in the current working directory.
For a fuller implementation, see the mfile sampleplot.m in the zipped folder.
Sourav Chatterjee (2023). Publication Quality Plots (https://www.mathworks.com/matlabcentral/fileexchange/31668-publication-quality-plots), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!