newmap
Description
newmap creates the default map axes in the current figure. By
default, the function creates a world map that uses an Equal Earth projection.
In some cases, the newmap function can change the current figure
and current axes. For more information, see Algorithms.
newmap( changes or
replaces the axes specified by target,___)target instead of the current axes, in
addition to any combination of inputs from the previous syntaxes.
mx = newmap(___) returns the MapAxes
object. Use mx to query and modify properties of the
MapAxes object after creation. For a list of properties, see MapAxes Properties.
Examples
Input Arguments
Tips
If you want advanced control of the map axes, or you want to include the map axes in an
app, use the mapaxes
function.
Algorithms
The behavior of the newmap function depends on the
NextPlot properties of the figure and axes.
First, the newmap function queries the NextPlot property of the figure.
If you specify the
targetinput argument, then the function uses the figure associated withtarget.If you do not specify the
targetinput argument, then the function uses the current figure. If there is no current figure, then the function creates a new figure.
This table shows how the newmap function changes the
figure based on the value of NextPlot.
Value of | Behavior of |
|---|---|
| The
|
| If you do not specify If you specify |
| The
This behavior is similar to using the |
| The
This behavior is similar to using the |
Then, the newmap function queries the NextPlot
property of the axes in the figure.
If you specify the
targetinput argument as an axes, then the function usestarget.If you do not specify the
targetinput argument, then the function uses the current axes. If there is no current axes, then the function creates a newMapAxesobject.
This table shows how the newmap function changes the axes based on
the value of NextPlot.
Value of | Behavior of |
|---|---|
| When the axes is a
When the axes is not a This behavior is similar to using the
|
| When the axes is a
When the axes is not a |
| When the axes is a
When the axes is not a This behavior is similar to using the
|
| When the axes is a
When the axes is not a This behavior is similar to using the
|
Version History
Introduced in R2023a





