plot2eps

Function to streamline the workflow of converting plots to eps files for inclusion in LaTeX.
2.1K Downloads
Updated Wed, 20 May 2009 07:41:34 +0000

View License

Requires plotepstex.m and laprint.m (included)

PLOT2EPS() If all input arguments are omitted, the function will run in user input mode prompting the user for the appropriate inputs.

PLOT2EPS(FIGNAME) Converts all figures in the FIGNAME.FIG file. Other arguments are set to defaults. eps2pdf.bat is generated to convert the eps files to pdf if the user wishes.

PLOT2EPS(FIGHANDLE) Converts all figures in the FIGHANDLE vector. Other arguments are set to defaults. eps2pdf.bat is generated to convert the eps files to pdf if the user wishes.

PLOT2EPS(FIG,'Option',value,...) Specifies one or more of the following options:
'filename': Specify a cell row vector with filenames for the eps figures. The cell vector should have the same number of cells as there are figures to be converted. If not specified, plot2eps will attempt to derive filenames from the figure titles. When more than one subplot is present, the title of the last subplot is used.
'ratio': Specify the figure width/height ratio as a scalar if all are the same or as a vector to set different values for each figure.
'deletetitle': Boolean value to be able to delete the title from figures. This may be desirable in a LaTeX document where captions are used to describe the figures.
'dir': Specify a full path to the location where the eps files should be saved. Leave blank for saving in the current directory.

This archive includes versions of plotepstex and laprint in which certain issues are fixed (it seems that there are bugs related to compatibility with newer versions of matlab) and features added. I have modified these files to suit my needs and I publish them only as is. Use what changes you like.

Cite As

Mark Verveld (2024). plot2eps (https://www.mathworks.com/matlabcentral/fileexchange/23698-plot2eps), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Printing and Saving in Help Center and MATLAB Answers
Acknowledgements

Inspired by: LaPrint, PlotEpsTeX

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.3.0.0

open source BSD license

1.2.0.0

legend box width in plotepstex, added lines to set CurrentFigure and CurrentAxes in the powertext code, figuresize in plotepstex, figcopy off, full path support in plotepstex

1.1.0.0

Corrected a bug when no path was specified.

Added fontsize and figure width options. Although figure width can easily be changed in latex, I have found that some figures need some more room to allow all the labels to print correctly.

1.0.0.0