Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

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

|

Introduced before R2006a

Was this topic helpful?