convertFig2Eps(figP​athOrFileNms,vararg​in)

版本 1.0.0.0 (6.5 KB) 作者: Yasen P
Automatic(Easy) figure to eps/png conversion. Multiple options &minimal effort, excellent for Latex!
32.0 次下载
更新时间 2018/4/13

查看许可证

function convertFig2Eps(figPathOrFileNms,varargin)

Description: Automatically(with minimal effort) converts figure(s) to EPS
format (by default). The format is aimed for publishing. The function has multiple
options for the convenience of the user.
INPUT(s) : all iinputs are optional
Main input: 'figPathOrFileNms' = > figure file, folder that contains
multiple figures, or list(cell) of figure file paths.
Extra options for paths: 'subdir' => includes all subdirectories for
(any) of the input(s) in 'figPathOrFileNms' is a directory path(s)
Extra options for fig: 'png' 'expand' 'normalize' 'wait' 'save'
Option: 'png' => specifies alternative output image format
Option: 'expand' => exapnds(maximizes) the axes within the figure window
Option: 'normalize' => normalizes the window to the screen size (fullscreen)
Option: 'wait' => waits before any for keypress "ENTER" after execution of all fomating(before 'save' and 'eval')
Option: 'save' => saves the changes made to the figure file in addition to the image output
Option: 'debug' => show which files were skiped over the conversion (i.e. are not *.fig files)
Extra options for fontsize using flags: 'fontsize1'/'fontsize2'/'fontsize3'/ ... /'fontsize100'

Extra options for fig: eval string format: ['eval:','---string to evaluate----']
This option can evaluate any command/function/script to additionally
process the figure before saving. For reference use the following
internal handles

Internal Figure File Full Path & Name: inputName => [pathstr,name,~] = fileparts(inputName);
Internal Figure Handle Name: fig => the current figure handle
Internal axes Handle/Variable Placeholder: ax => empty variable, can be used for any purpose


OUTPUT: the output is the converted to image from the converted figure in
the specified format

EXAMPLE:
example 1: "convertFig2Eps" /or/ "convertFig2Eps()" /or/ "convertFig2Eps('.')"
example 2: "convertFig2Eps('C:','subdir','png','expand','normalize','fontsize100','save','eval:disp(fig.Number);')"

----- Possible future options add ETA for long conversions.

引用格式

Yasen P (2025). convertFig2Eps(figPathOrFileNms,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/66903-convertfig2eps-figpathorfilenms-varargin), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2016a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Printing and Saving 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Updated Summay