Exportfigure

From Eigenvector Research Documentation Wiki
Revision as of 13:21, 4 November 2015 by imported>Scott (→‎Options)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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)
    • 'clipboardbitmap'  : System Clipboard in bitmap format (legacy syntax).
    • 'clipboard_default' : Use default for given system.
    • 'clipboard_meta' : Use Windows meta.
    • 'clipboard_macscreencapture' : Mac OS screencapture utility.
    • 'clipboard_macold' : Builtin screen capture on older Mac/Matlab version.
    • 'clipboard_bitmap' : Bitmap image.
    • 'clipboard_getframe' : Use getframe function to capture movie frame to clipboard.
    • 'clipboard_pdf' : PDF format to clipboard.
  • 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: Once a target has been used, that target will remain the default for later calls made without a target specified.

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 ('clipboard_macscreencapture') (shell command) rather than use Matlab command on Mac systems (legacy behavior).

See Also

reportwriter