Default figure property doesn't seem to be working properly
5 ビュー (過去 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 で Graphics Object Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!