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!