MATLAB: Data tips rounding above 10000

bugdata tipMATLABroundingundocumented

Is this intended behavior?
When using histogram to plot the count of categories in a categorical array, the data tips for the bars whose values are above 10000 are rounded to the 10s digit (e.g. 10005 is rounded to 10010). This undocumented behavior gives the impression that extra data are included or data are missing.
cats = categorical();
for count = 9985:10:10015
cats = [cats; repmat(categorical(count), count, 1)];
end
h = histogram(cats, 'DisplayOrder', 'descend')
I've checked that the source of data for the data tip contains the correct values. To correct the data tips, I need to change the data tip template format from 'auto' to '%i' using h.DataTipTemplate.DataTipRows(1).Format = '%i'.
It seems like this behavior (auto format rounding data tips to the nearest 10s above 10000) is either a bug or an undocumented feature. Is this intended behavior?
Using: MATLAB Version: 9.8.0.1417392 (R2020a) Update 4

Best Answer

Recently reported here as well. Feedback has been given internally about the current behavior.