Main Content

removeToolbarMapButton

Remove map button from toolbar

Since R2021b

    Description

    removeToolbarMapButton(tb) removes all map buttons from the axes toolbar tb.

    example

    removeToolbarMapButton(tb,"basemap") remove the basemap picker from the axes toolbar.

    Examples

    collapse all

    Display the locations of European capitals on a map. When there is no current axes, the geoiconchart function plots the data by creating a new geographic axes.

    [lat,lon] = readvars("european_capitals.txt");
    
    figure
    geoiconchart(lat,lon)
    geolimits([37.3 54.6],[-8.9 31.2])

    Create a custom axes toolbar. Add all map buttons to the toolbar.

    tb = axtoolbar("default");
    addToolbarMapButton(tb)

    Remove all map buttons from the toolbar.

    removeToolbarMapButton(tb)

    Figure contains an axes object with type geoaxes. The geoaxes object contains an object of type iconchart.

    Input Arguments

    collapse all

    Axes toolbar, specified as an AxesToolbar object or an array of AxesToolbar objects.

    Version History

    Introduced in R2021b