필터 지우기
필터 지우기

calling annotation function cause error

조회 수: 2 (최근 30일)
mado
mado 2022년 6월 20일
댓글: dpb 2022년 6월 20일
what is problem in runing this code it gives error
if ishg2parent( varargin{:} )
try
h = annotationHGUsingMATLABClasses(varargin{:});
catch me
throw(me)
end
if nargout > 0
hOut = h;
end
return;
end
the error is
Error using annotation (line 53)
X and Y values must be between 0 and 1
Error in cleanrob_visualize (line 359)
gview.arrows(i-1, 1) = annotation('arrow', fliplr(ax), ay, sty.arrow{:});
  댓글 수: 1
dpb
dpb 2022년 6월 20일
"By default, the units are normalized to the figure. The lower left corner of the figure maps to (0,0) and the upper right corner maps to (1,1). "
What's wrong is precisely what the error message says -- by default annotation uses Normalized units and you have passed something outside the range of [0 1] for either x or y (or both) without changing the 'Units' property to something else
Units — Position units
'normalized' (default) | 'inches' | 'centimeters' | 'characters' | 'points' | 'pixels'
are your choices, axes limits aren't a choice for some reason I've never fathomed...

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by