This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


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.





setLabelTextFormatter(h,str) sets the format used to display the label text of the Distance tool, h.


Format Label of Distance Tool

Display an image and create a Distance tool.

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');

Input Arguments

collapse all

Distance tool, specified as an imdistline object.

Text format of Distance tool label, specified as a character array in a format expected by sprintf.

Introduced before R2006a