Main Content

gridm

Control graticule lines on axesm-based map

Syntax

gridm
gridm('on')
gridm('off')
gridm('reset')
gridm(linespec)
gridm(MapAxesPropertyName, PropertyValue,...)
h = gridm(...)

Description

gridm toggles the display of a latitude-longitude graticule. The choice of meridians and parallels, as well as their graphics properties, depends on the property settings of the axesm-based map.

gridm('on') creates the graticule, if it does not yet exist, and makes it visible.

gridm('off') makes the graticule invisible.

gridm('reset') redraws the graticule using the current axesm-based map properties.

gridm(linespec) uses any valid linespec to control the graphics properties of the lines in the graticule.

gridm(MapAxesPropertyName, PropertyValue,...) sets the appropriate graticule properties to the desired values. For a description of these property names and values, see Properties That Control the Grid section of the axesm property reference page.

h = gridm(...) returns the handles of the graticule lines. If both parallels and meridians exist, then h is a two-element vector: h(1) is the handle to the line comprising the parallels, and h(2) is the handle to the line comprising the meridians.

Tips

  • You can also create or alter map grid properties using the axesm or setm functions.

  • By default the Clipping property is set to 'off'. Override this setting with the following code:

    hgrat = gridm('on'); 
    set(hgrat,'Clipping','on')

Version History

Introduced before R2006a

See Also

|