MATLAB: How to add space between labels values and its represented values in a plot

MATLABplotplottingtext;

The following code, plots the black dots. I'd like to create some separation between the black dots and the red label number of each dot.
for i=1:nr_BBU
plot(BBU(i,2), BBU(i,1), 'k.', 'MarkerSize',25)
labels = cellstr(num2str([i]'));
%text(BBU(i,2), BBU(i,1), labels, 'Color', 'r', 'HorizontalAlignment', 'left', 'Position', '2')
text(BBU(i,2), BBU(i,1),labels,'HorizontalAlignment','center','VerticalAlignment', 'bottom',...
'Color', 'r', 'FontSize',12)
hold on
end

Best Answer

You can add vertical space by increading the value of the 2nd input to text()
text(BBU(i,2), BBU(i,1) * 1.05,labels, . . .)
% ^^^^^^^^^^^^^^^
or by using labelpoints() from the file exchange. This line below plots the labels North ("N") of the points with a buffer space of 10% (0.1) of the axis range.
labelpoints(BBU(i,2), BBU(i,1), labels, 'N', 0.1, 'Color', 'r', 'FontSize', 12)
% ^^^ buffer