Quantcast

Documentation Center

  • Trial Software
  • Product Updates

gridm

Toggle and control display of graticule lines

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 map axes.

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 map axes properties.

gridm(linespec) uses any valid linespec string 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 the Properties That Control the Grid section of the axesm 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.

More About

expand all

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')

See Also

|

Was this topic helpful?