Main Content

setm

Set properties of axesm-based map and graphics objects

    Description

    setm(abm,propname,propval) sets the property propname of the axesm-based map abm to the value propval. You can set multiple properties and their values at a time by using comma-separated pairs. For a full list of axesm-based map property names and valid values, see axesm-Based Map Properties.

    example

    setm(gs,propname,propval) sets the property propname of the graphic scale gs to the value propval. You can set multiple properties and their values at a time by using comma-separated pairs. For a full list of graphic scale property names and valid values, see scaleruler.

    setm(txt,"MapPosition",pos) sets the position of the projected text txt to the position pos.

    setm(surf,"Graticule",lat,lon,alt) warps the graticule of the projected surface surf to the vertices specified by lat and lon and the altitudes specified by alt.

    setm(mesh,"MeshGrat",npts,alt) warps the mesh graticule of the projected surface mesh using the graticule size npts and the altitude alt. This syntax requires that you create mesh by using the meshm function.

    Examples

    collapse all

    Create an axesm-based map using a Bonne projection.

    axesm bonne

    Figure contains an axes object. The axes object is empty.

    View the frame and grid by setting the Frame and Grid properties.

    abm = gca;
    setm(abm,"Frame","on","Grid","on")

    Figure contains an axes object. The axes object contains 3 objects of type patch, line.

    The standard Bonne projection has a standard parallel at 30ºN. Change the projection to a sinusoidal projection by setting the standard parallel to 0º.

    setm(abm,"MapParallels",0)

    Figure contains an axes object. The axes object contains 3 objects of type patch, line.

    Input Arguments

    collapse all

    axesm-based map, specified as a map created using the axesm, worldmap, or usamap function.

    Graphic scale, specified as a Group object created using the scaleruler function.

    Property name, specified as a character vector or a string scalar. For a full list of axesm-based map property names and valid values, see axesm-Based Map Properties. For a full list of graphic scale property names and valid values, see scaleruler.

    Data Types: char | string

    Property value, specified as an array. For a full list of axesm-based map property names and valid values, see axesm-Based Map Properties. For a full list of graphic scale property names and valid values, see scaleruler.

    Projected text, specified as a Text object created using the textm function.

    Text position, specified as a two-element vector of the form [lat lon] or a three-element vector of the form [lat lon alt], where lat specifies the latitude, lon specifies the longitude, and alt specifies the altitude. When you specify a two-element vector, the setm function assumes that alt is 0.

    Data Types: single | double

    Projected surface created from a geolocated data grid, specified as a Surface object displayed on an axesm-based map. Functions that project surfaces onto axesm-based maps include surfm and surflm.

    Latitude coordinates of the graticule vertices, specified as a matrix.

    The sizes of lat and lon must match.

    Data Types: single | double

    Longitude coordinates of the graticule vertices, specified as a matrix.

    The sizes of lat and lon must match.

    Data Types: single | double

    Altitude of the graticule vertices, specified as a numeric scalar or a numeric matrix.

    • When you specify a scalar, the altitude applies to each graticule vertex.

    • When you specify a matrix, the size of alt must match the size of lat and lon or match the value of npts.

    Projected surface created from a regular data grid, specified as a Surface object created using the meshm function.

    Size of the graticule, specified as a two-element numeric vector [p m], where p specifies the number of parallels and m specifies the number of meridians.

    Version History

    Introduced before R2006a