Set format used to display text label of Distance tool
setLabelTextFormatter
is not recommended. Use one of the ROI
classes instead, described in ROI Creation Overview.
Display an image and create a Distance tool.
imshow('pout.tif')
hline = imdistline(gca,[71 171],[108 150]);
Modify the format of the label to indicate that distance is measured in pixels.
setLabelTextFormatter(hline,'%02.0f pixels');