Main Content

ismapped

Determine if object is projected on axesm-based map

    Description

    tf = ismapped determines if the current object is projected on an axesm-based map. An axesm-based map is a map created using the axesm, worldmap, or usamap function. The function returns 1 if the current object is projected on an axesm-based map and 0 otherwise.

    tf = ismapped(A) determines if the input A is projected on an axesm-based map.

    example

    [tf,msg] = ismapped(A) additionally returns the reason why the input is not projected on an axesm-based map.

    Examples

    collapse all

    Load a MAT file containing the coordinates of global coastlines into the workspace. Create a world map and then plot the coastline data.

    load coastlines
    figure
    worldmap("world") 
    p = plotm(coastlat,coastlon);

    Figure contains an axes object. The hidden axes object contains 18 objects of type patch, line, text.

    Determine if the object is projected on an axesm-based map.

    tf = ismapped(p)
    tf = 
    1
    

    Input Arguments

    collapse all

    Input array. The array can have any type.

    Output Arguments

    collapse all

    Indicator for an object projected on an axesm-based map, returned as one of these values:

    • 1 indicates that the current object is projected on an axesm-based map.

    • 0 indicates that the current object is not projected on an axesm-based map.

    Data Types: double

    Reason why current object is not projected on axesm-based map, returned as a character vector.

    Limitations

    • The ismapped function does not support mapped objects created using the geoshow function.

    Version History

    Introduced before R2006a

    See Also

    Functions