Changing the property of arrow using property inspector.

I have to put an arrow at a specific position on the figure. I am trying to change the position of the arrow using the property inspector. But an error is thrown out " ERROR SETTING PROPERTY "POSITION" OF CLASS LINE "NaN is not supported". This is the first time i came across the error. I am using MATLAB2020. Kindly help me to solve this.

댓글 수: 4

Give us code for a minimum working example from which said symptom can be attempted to be recreated...
I am not writing any code. I am plotting a simple XY plot. After plotting, I have inserted an arrow using the "INSERT" option in the figure window. After right clicking the arrow, I will open the property inspector and tried to change the position of the arrow and the error throws up. I am attaching two screen shots for your reference.
Also I am entering a 1 cross 4 vector only
I'd never used the function before -- but w/ R2020b I get same symptoms -- couldn't change anything in the position vectors.
Looks like a bug to me; submit service request to support@mathworks.com

댓글을 달려면 로그인하십시오.

답변 (1개)

Pravarthana P
Pravarthana P 2022년 6월 28일
편집: Pravarthana P 2022년 6월 28일
Hi Naveen K S,
I understand that you are facing an error while trying to change the position of the arrow through property inspector and encountering an error.
This is a known issue and our team is working on it which may be resolved in the upcoming releases, in the mean time here is one of the possible work arounds which you can try:
You can get the object programmatically and access it using dot operator as follows:
1) Click on the object to select it with the Edit Plot tool (the white cursor icon)
2) Without clicking anywhere else in the figure, switch to the MATLAB Command Window
3) Enter the following commands to change a property
gcf
objectHandle = f.CurrentObject; % returns a handle to the selected object (here it will the arrow)
objectHandle.<property name> = [0.58 0.58]; % change any property programmatically
4) Switch back to the figure window
I hope the above-mentioned information resolves your issue!!

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2022년 6월 23일

편집:

2022년 6월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by