hgsave
Save Handle Graphics object hierarchy to file
Syntax
hgsave('filename')
hgsave(h,'filename')
hgsave(...,'all')
hgsave(...,'-v6')
hgsave(...,'-v7.3')
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 the extension .fig is appended. If h is a vector, none of the handles in h may be ancestors or descendents
of any other handles in h.
hgsave(...,'all') overrides the default behavior, which does not save nonserializable objects. Nonserializable 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 ensures that nonserializable objects are also saved. This option is obsolete and will be removed in a future release.
hgload
Load Handle Graphics object hierarchy from file
Syntax
h = hgload('filename')
[h,old_prop_values] = hgload(...,property_structure)
hgload(...,'all')
Description
h = hgload('filename') loads Handle Graphics objects and its children (if any) from the FIG-file specified by filename and returns handles to the top-level objects. If filename contains no extension, then the MATLAB software adds the .fig extension.
[h,old_prop_values] = hgload(...,property_structure) overrides the properties on the top-level objects stored in the FIG-file with the values in property_structure, and returns their previous values in old_prop_values.
本文详细介绍了MATLAB中用于保存和加载句柄图形对象的hgsave和hgload函数的用法。hgsave可以将当前图形或指定句柄的图形保存到文件,而hgload则可以从文件中加载图形对象及其子对象。文章提到了保存默认工具栏和菜单的注意事项,以及如何处理非序列化对象。

6477

被折叠的 条评论
为什么被折叠?



