Main Content

clipdata

Clip data at +/-pi in longitude, +/-pi in latitude

Syntax

[lat,long,splitpts] = clipdata(lat,long,object)

Description

[lat,long,splitpts] = clipdata(lat,long,object) inserts NaNs at the appropriate locations in a map object so that a displayed map is clipped at the appropriate edges. It assumes that the clipping occurs at +/- pi/2 radians in the latitude (y) direction and +/- pi radians in the longitude (x) direction.

The input data must be in radians and properly transformed for the particular aspect and origin so that it fits in the specified clipping range.

The output data is in radians, with NaNs placed at the proper locations. The output variable splitpts returns the row and column indices of the clipped elements (columns 1 and 2 respectively). These indices are necessary to restore the original data if the map parameters or projection are ever changed.

The object parameter can have any of the following values:

Object to clipDescription
'surface'graticules
'light'lights
'line'lines
'patch'patches
'text'text object location points
'point'point data
'none'skip all clipping operations
Introduced before R2006a