Spooky Graphed Data?

조회 수: 14 (최근 30일)
Guanting
Guanting 2025년 10월 31일
편집: dpb 2025년 11월 4일
Data tip doesn't match Yaxis or actual data. Actual data is 1073741824.
Can anyone explain this?

답변 (2개)

dpb
dpb 2025년 10월 31일
Longstanding behavior -- the datatip values are rounded to some (as far as I know an unspecified) number of significant digits; probably for cleanliness of display considerations.

Fangjun Jiang
Fangjun Jiang 2025년 10월 31일
편집: Fangjun Jiang 2025년 10월 31일
a=plot(1073741820:1073741829);
datatip(a);
c=a.DataTipTemplate;
c.DataTipRows(2).Format
ans = 'auto'
c.DataTipRows(2).Format='%d';
  댓글 수: 5
Fangjun Jiang
Fangjun Jiang 2025년 11월 2일
Thank you @dpb for digging it up. I tried and saw the "auto" format and then searched for the other format. That is all I did.
dpb
dpb 2025년 11월 2일
편집: dpb 2025년 11월 4일
The real contribution was yours to make me curious about whether the interactive callback used the same ptopertiy and then that led to the discovery it is an undocumented and hidden(*) property of every line object.
(*) The actual property .DataTipRows is hidden such that even <Yair Altman's near magical GETUNDOCUMENTED function> doesn't find it which; having never seen it before, had led me to the erroneeous conclusion long ago that it was implemented as an internal callback from the axes and the two weren't really connected at all. Certainly the documentation doesn't provide any hint.
>> HL=plot(rand(10,1); % generate line handle to poke at...
>> U=getundocumented(HL)
U =
struct with fields:
ALimInclude: on
ALimIncludeMode: 'auto'
ALimInclude_I: on
AlignVertexCentersMode: 'auto'
...
CLimInclude_I: on
ChildrenMode: 'auto'
Children_I: [0×0 GraphicsPlaceholder]
ClippingMode: 'auto'
Clipping_I: on
Color_I: [0 0.447 0.741]
Copyable: 1
CreateFcnMode: 'auto'
CreateFcn_I: ''
CreateFcn_IS: '???'
DataTipTemplate_IS: [0×0 GraphicsPlaceholder]
DatetimeTickFormat: ''
DefaultPropMap_Internal: [0×0 struct]
...
>>
reveals only an empty graphics object placeholder; no hint that the actual set of properties are extant and addressable if one does stumble onto the fact they do belong to the lines on the axes.

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

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by