Exportfigure: Difference between revisions
Jump to navigation
Jump to search
imported>Scott |
imported>Jeremy No edit summary |
||
Line 1: | Line 1: | ||
===Purpose=== | ===Purpose=== | ||
Automatically export figures to an external program | Automatically export figures to an external program or system clipboard. | ||
===Synopsis=== | ===Synopsis=== | ||
:exportfigure | :exportfigure | ||
:exportfigure(target,sourcefigs) | :exportfigure(target,sourcefigs,options) | ||
===Description=== | ===Description=== | ||
Exports one or more open figures into a new blank document in an external program. No inputs are required. | Exports one or more open figures into a new blank document in an external program or to the system clipboard. No inputs are required. Some of the output targets only operate on Microsoft Windows. | ||
====Optional Inputs==== | ====Optional Inputs==== | ||
* '''target''' = The target program to export figures to, target can have the following values: | * '''target''' = The target program to export figures to, target can have the following values: | ||
** ''''powerpoint'''' : Microsoft PowerPoint {default} | ** ''''powerpoint'''' : Microsoft PowerPoint {default} (Windows only) | ||
** ''''word'''' : Microsoft Word | ** ''''word'''' : Microsoft Word (Windows only) | ||
** ''''png'''' : Save as PNG in current directory | ** ''''png'''' : Save as PNG in current directory | ||
** ''''eps'''' : Save as EPS in current directory | ** ''''eps'''' : Save as EPS in current directory | ||
Line 22: | Line 22: | ||
* '''sourcefigs''' = A vector of figure numbers to export {default is the current open figure (see GCF)}. | * '''sourcefigs''' = A vector of figure numbers to export {default is the current open figure (see GCF)}. | ||
** '''sourcefigs''' = 'all', exports all open figures. | ** '''sourcefigs''' = 'all', exports all open figures. | ||
* '''options''' = Options structure as described below. | |||
Note: "clipboard" export can only operate on one figure at a time. | Note: "clipboard" export can only operate on one figure at a time. | ||
===Options=== | |||
''options'' = a structure array with the following fields: | |||
* '''display''': [ 'off' | {'on'} ], governs level of display to command window, | |||
* '''ppresizefontfactor''': [1.5] The factor by which fonts should be resized prior to copying figure into PowerPoint. Default up-sizes all fonts by 50% (=1.5). A value of 1.0 will leave the font size alone. | |||
* '''wordresizsefontfactor''': Same as above but for Microsoft Word. | |||
* '''resizemode''': [ 'none' | {'aspect'} | 'exact' ] Governs the figure resizing mode. | |||
** 'none' = no figure resizing is done | |||
** 'aspect' = figure is resized maintaining the aspect ratio (the figure is resized so that its larger dimension matches the corresponding target dimension). | |||
** 'exact' = figure is resized to exactly match the target size dimensions. The aspect ratio will change. | |||
* '''pptargetsize''': [885 591] [X Y] Specified size for the figure when copying. A value of [] will leave the figure size alone (same as setting 'none' for the resizemode option, but can be done specifically for powerpoint only) | |||
* '''wordtargetsize''' : Same as above but for Microsoft Word. | |||
* '''forcemacscreenshot''' : When using 'clipboard', force use of screencapture (shell command) rather than use Matlab command. | |||
===See Also=== | ===See Also=== | ||
[[reportwriter]] | [[reportwriter]] |
Revision as of 14:56, 26 August 2014
Purpose
Automatically export figures to an external program or system clipboard.
Synopsis
- exportfigure
- exportfigure(target,sourcefigs,options)
Description
Exports one or more open figures into a new blank document in an external program or to the system clipboard. No inputs are required. Some of the output targets only operate on Microsoft Windows.
Optional Inputs
- target = The target program to export figures to, target can have the following values:
- 'powerpoint' : Microsoft PowerPoint {default} (Windows only)
- 'word' : Microsoft Word (Windows only)
- 'png' : Save as PNG in current directory
- 'eps' : Save as EPS in current directory
- 'clipboard' : System Clipboard (to paste into other program)
- sourcefigs = A vector of figure numbers to export {default is the current open figure (see GCF)}.
- sourcefigs = 'all', exports all open figures.
- options = Options structure as described below.
Note: "clipboard" export can only operate on one figure at a time.
Options
options = a structure array with the following fields:
- display: [ 'off' | {'on'} ], governs level of display to command window,
- ppresizefontfactor: [1.5] The factor by which fonts should be resized prior to copying figure into PowerPoint. Default up-sizes all fonts by 50% (=1.5). A value of 1.0 will leave the font size alone.
- wordresizsefontfactor: Same as above but for Microsoft Word.
- resizemode: [ 'none' | {'aspect'} | 'exact' ] Governs the figure resizing mode.
- 'none' = no figure resizing is done
- 'aspect' = figure is resized maintaining the aspect ratio (the figure is resized so that its larger dimension matches the corresponding target dimension).
- 'exact' = figure is resized to exactly match the target size dimensions. The aspect ratio will change.
- pptargetsize: [885 591] [X Y] Specified size for the figure when copying. A value of [] will leave the figure size alone (same as setting 'none' for the resizemode option, but can be done specifically for powerpoint only)
- wordtargetsize : Same as above but for Microsoft Word.
- forcemacscreenshot : When using 'clipboard', force use of screencapture (shell command) rather than use Matlab command.