File Exchange

image thumbnail

FIGUREMAKER - Publication quality figures with matlab

version (51.2 KB) by Todd Karin
Create publication quality graphics, allowing rgb color scaling, pdf output and correct fontsizes.


Updated 23 Jul 2013

View Version History

View License

figuremaker helps users generate publication quality graphics from
matlab. This code was modified from the exportfig function, available
This function is nice in that the font sizes on the exported figure
will agree with the font size of the document the figure is placed

Exportfig was modified to allow rgb color in the exported figure.
Also, export of pdf file format is implemented with help from Oliver
Woodford's export_fig package, available at

The file format of the output is automatically chosen from the
filename, for example

>> exportfig('filename.pdf')

exports the current figure into pdf format.

Cite As

Todd Karin (2021). FIGUREMAKER - Publication quality figures with matlab (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)


I've been using this for years. However, it may have an issue in 2020a - with respect to legend size. legends seem much larger in 2020a than in 2018b.

junmin wang

Error: Ghostscript is not found. How to solve this problem????

Elizabeth H


There is a known bug in Matlab 2014b that causes the figure to be exported without a proper crop:

It appears this is causing an issue with figuremaker. If anyone finds a solution to this that works, please let me know. Also, I will post an update if I fix this issue. For now, there are a number of free programs that can be used to modify the bounding box of a pdf file.


Hi Todd and thank you very much, I have started using your code and it is definitely better than export_fig, because in the papers I like to have all the figures with fixed size and font, and this is so simple to get with your submission!
However, unfortunately it is not working correctly in R2014b: the figure is not cropped and it appears on a full A4 sheet (which is mostly empty), with the figure at the bottom of the A4.
Is there a solution for this?


Reply to Vltor. The legend size is chosen so that it has the font size is correct. Try increasing the figure's 'width' option to make the legend proportionally smaller.



Fantastic improvement in output. Does just what I needed. Thanks to you and the authors of the other packages you've used.

VItor ribeiro

Thank you for this submission, but unfortunately it doesnt work for me. The legend becomes too big after rendering the figure. Is a pitty because the quality of the rendering seems to be a little bit better then the export_fig package.


Thanks! This replaces a set of ad hoc scripts I had created for my own articles with something much more carefully written. Everyone in my group uses this to create figures for their publications now.

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Exportfig, export_fig

Inspired: SplitPDFcolorBW

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!