Main Content

tagm

Set Tag property of objects on axesm-based map

    Description

    example

    tagm(obj,tagstr) sets the Tag property of the objects in obj to the values in tagstr.

    The namem and handlem functions use the Tag property to identify objects on axesm-based maps.

    Examples

    collapse all

    Create a line and view its name.

    axesm miller
    lats = [3 2 1 1 2 3]; 
    longs = [7 8 9 7 8 9];
    h = plotm(lats,longs);

    untagged = namem(h)
    untagged = 
    'line'
    

    Rename the line by using the tagm function.

    tagm(h,"newName")
    tagged = namem(h)
    tagged = 
    'newName'
    

    Input Arguments

    collapse all

    Objects to tag, specified as an array of graphics objects. Each graphics object must have a Tag property.

    Tag, specified as a character vector, string scalar, or character matrix.

    • To use the same tag for all the objects in obj, specify tagstr as a character vector or a string scalar.

    • To use a different tag for each object in obj, specify tagstr as a character matrix. The number of rows in the matrix must match the number of objects in obj.

    Version History

    Introduced before R2006a

    See Also

    | | | |