# capture

## Purpose

Screen capture of current figure (UNIX only).

## Synopsis

    capture(fig)
    capture
    [X,map] = capture

## Description

`capture(fig)` makes a new figure that contains a copy of the figure with handle `fig`. This screen capture contains any uimenus or uicontrols present in `fig`.

`capture`, with no input arguments, captures the current figure.

`[X,map] = capture(fig)` returns an image matrix and a colormap representing the figure `fig`. To display this information, use

    colormap(map)
    image(X)

`capture` produces a bitmap copy of the contents of the figure window and displays it as a single image object in a new figure window. The resolution of this copy is not as good as that obtained with the `print` command. Unlike `print`, however, `capture` includes uimenus and uicontrols. Use `capture` followed by `print` to obtain hardcopy that includes ui objects as well as an image or graphics.

## See Also

    image, print

(c) Copyright 1994 by The MathWorks, Inc.