File Exchange

image thumbnail


version (15.3 KB) by David J. Mack
Print figures to files in several formats for publication.


Updated 07 Sep 2017

View License

This function prints (finalized) figures to files in several formats, stores additional UserData as text files and creates also a folder with bitmap-thumbnails of the figures for quick check.
The intended workflow is the following:
1. Gather your data.
2. Create nice figures (set all important properties of the figures, most importantly 'PaperPositionMode').
3. (Optional) Store supplemental data as formatted string in the figure's 'UserData' (e.g. statistics, notes, etc.).
4. (Optional) Resize your legend (probably using RESIZELEGEND; ML-FEX ID:58914).
5. Call PRINTFIGS2FILES with your intended parameters.
The UserData can be additionally of type STRUCT or, if TABLE2CHAR (ML-FEX ID:58951) is present, of type TABLE/DATASET.
Feature request are welcome!
Links to the other files:

Comments and Ratings (0)


[FIX] Missing check for TABLE2CHAR.
[FIX] Error when parsing STRUCTs with column fields.
[MOD] Now also uses the EVALC(DISP(.)) hack to convert STRUCT userData.
[MOD] Added sub-function OBJ2CHAR for the EVALC(DISP(.)) hack.

Several modifications & fixes (see m-file for details) and added functionality ('fig' & 'figc' formats to save as .fig-files using SAVEFIG).

Minor error during upload.

[MOD] Optional input argument 'Directory' may now also be empty (in which case the default is used).

ADDED: Now converts any non-emtpy UserData type to text by using a fallback solution for unsupported types.

Added links and note on dependency.

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