exportapp(fig, filename)
| Parameter | Description |
|---|---|
| fig | figure object: figure or UI figure to capture. |
| filename | a character vector or string scalar: destination image file. |
| Parameter | Description |
|---|
exportapp(fig, filename) captures the figure fig, including all of its UI components, and writes it to the image file filename.
The output file format is determined by the extension of filename (for example .png, .jpg, or .tif).
Unlike saveas, exportapp is intended to export figures created with uifigure that contain UI components such as buttons, sliders, and tables.
f = uifigure('Position', [100 100 300 200]);
b = uibutton(f, 'Text', 'Export me');
exportapp(f, [tempdir(), 'exportapp_example.png']);
img = imread([tempdir(), 'exportapp_example.png']);
figure();
imshow(img)
| Version | Description |
|---|---|
| 2.0.0 | initial version |