Default figure property doesn't seem to be working properly
3 次查看(过去 30 天)
显示 更早的评论
There is a new text property introduced in Matlab R2021b called 'interactions' that is causing me problems, so after I create my figure I set the default value as follows:
set(FigHandle,'defaulttextinteractions',[]);
But then after my axes have been created, I search for one of the axis lables and check it's interactions property as follows:
a = findobj('string','Micro-seconds');
get(a,'interactions')
ans =
EditInteraction with no properties.
Also I checked the axis default as follows:
get(gca,'defaulttextinteractions')
ans =
[]
This indicates the default values are not being observed, because if they were, the axis label would have been created with a text object with a null interaction value.
If I manually change this property for this particular text object by typing:
set(a,'interactions',[])
Then the text object behaves as it does with earlier Matlab versions (and the way I want it to behave).
But it would be a real pain to go thru my entire program and set each text object individually with this null property value. This is why Matlab has default property values, but in this case it doesn't seem to be working. Does anyone have a suggestion for how to get it to work?
Thanks for any advice you can offer
~Paul
1 个评论
Image Analyst
2022-3-11
What does this new property do? If you set it to null, and then ask what it is and it tells you it is null, why is that surprising?
The axis label is a different object than the axis. I think it's a child object so could/would/might have different properties than the parent container object.
Also I don't believe setting a figure property means that all axes on the figure, and all other widgets on the figure, will get the same properties with the same values.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!