How can I use struct2handle for a figure with a legend?

2 次查看(过去 30 天)
In the below example in R2014a, I am getting an error due to missing property.
>> f = figure('name','test');
>> plot(1:10);
>> legend('test');
>> s = handle2struct(f);
>> f2 = struct2handle(s,0);
Error using scribe.legend/get
The name 'ScribePLegendListeners' is not an accessible property for an instance of class 'legend'.
Error in scribe.legend/init>changedString (line 297)
newlis = get(h,'ScribePLegendListeners');
Warning: Error occurred while evaluating listener callback.
I am trying to avoid using the hgsave/hgload functions as I would like to prepare and save multiple figures in the one mat file, to be manipulated by seperate process.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by