MATLAB Function Reference    
hgsave

Saves a Handle Graphics object hierarchy to a file

Syntax

Description

hgsave('filename') saves the current figure to a file named filename.

hgsave(h,'filename') saves the objects identified by the array of handles h to a file named filename. If you do not specify an extension for filename, then MATLAB adds the extension ".fig". If h is a vector, none of the handles in h may be ancestors or descendents of any other handles in h.

hgsave('filename','all') overrides the default behavior, which does not save non-serializable objects. Non-serializable objects include the default toolbars and default menus. This allows revisions of the default menus and toolbars to occur without affecting existing FIG-files and also reduces the size of FIG-files. Passing the string all to hgsave insures that non-serializable objects are also saved.

Note: the default behavior of hgload is to ignore non- serializable objects in the file at load time. This behavior can be overwritten using the all argument with hgload.

See Also

hgload, open


 hgload hidden