# geoplot

Plot line in geographic coordinates

## Syntax

## Description

### Vector Data

`geoplot(`

plots a line in geographic coordinates. Specify latitude coordinates in degrees
using `lat`

,`lon`

)`lat`

, and specify longitude coordinates in degrees
using `lon`

. If the current axes is not a geographic or map
axes, or if there is no current axes, then the function plots the line in a new
geographic axes.

### Table Data

`geoplot(`

plots the variables `tbl`

,`latvar`

,`lonvar`

)`latvar`

and `lonvar`

from
the table `tbl`

. To plot one data set, specify one variable for
`latvar`

and one variable for `lonvar`

. To
plot multiple data sets, specify multiple variables for
`latvar`

, `lonvar`

, or both. If both
arguments specify multiple variables, they must specify the same number of
variables. *(Since R2022b)*

### Additional Options

`geoplot(`

displays
the plot in the axes specified by `ax`

,___)`ax`

. Specify the axes as
the first argument in any of the previous syntaxes.

`geoplot(___,`

specifies properties of the chart line using one or more name-value arguments.
The properties apply to all the plotted lines. For a list of properties, see
Line Properties.`Name,Value`

)

returns
a column vector of chart line objects. Each object corresponds to a plotted
line. Use `h`

= geoplot(___)`h`

to modify the properties of the plot after
creating it. For a list of properties, see Line Properties.

**Note**

Mapping Toolbox™ extends the functionality of the `geoplot`

(MATLAB^{®}) function. It adds support for displaying points, lines, and polygons with coordinates in any supported geographic or projected coordinate reference system (CRS). For the `geoplot`

(Mapping Toolbox) page, see `geoplot`

(Mapping Toolbox).

## Examples

## Input Arguments

## Output Arguments

## Tips

Plot 3-D geographic data using

`geoglobe`

(Mapping Toolbox) and`geoplot3`

(Mapping Toolbox).When you plot on geographic axes, the

`geoplot`

function assumes that coordinates are referenced to the WGS84 coordinate reference system. If you plot using coordinates that are referenced to a different coordinate reference system, then the coordinates may appear misaligned.The

`geoplot`

function uses colors and line styles based on the`ColorOrder`

and`LineStyleOrder`

properties of the axes. The function cycles through the colors with the first line style. Then, it cycles through the colors again with each additional line style.Plotting data that requires Cartesian axes into a geographic axes or map axes is not supported.

To plot additional data into the axes, use the

`hold on`

command.

## Version History

**Introduced in R2018b**

## See Also

### Functions

`geoscatter`

|`geobubble`

|`plot`

|`geobasemap`

### Properties

- Line Properties | GeographicAxes Properties | MapAxes Properties (Mapping Toolbox)

^{1} Alignment of boundaries and region labels are a presentation of the feature provided by the
data vendors and do not imply endorsement by MathWorks^{®}.