# plot

Plot RoadRunner HD Map using MATLAB

Since R2022b

## Syntax

``plot(rrMap)``
``plot(rrMap,Name=Value)``

## Description

example

````plot(rrMap)` plots the RoadRunner HD Map's lane centers, lane boundaries, lane group centers, and barriers.```
````plot(rrMap,Name=Value)` specifies additional name-value pair arguments for the HD map.```

## Examples

collapse all

Create an empty RoadRunner HD Map by calling the `roadrunnerHDMap` object.

`rrMap = roadrunnerHDMap;`

Specify the name of the binary file you want to read. Use the `read` function to read the file specified by the argument `filename`.

```filename = "C:\RR\MyProject\Scenes\MyMap.rrhd"; read(rrMap,filename) rrMap```
```rrMap = roadrunnerHDMap with properties: Author: "Map Author" Projection: "" GeographicBoundary: [2×3 double] Lanes: [0×1 roadrunner.hdmap.Lane] LaneBoundaries: [0×1 roadrunner.hdmap.LaneBoundary] LaneGroups: [0×1 roadrunner.hdmap.LaneGroup] LaneMarkings: [0×1 roadrunner.hdmap.LaneMarking] Junctions: [0×1 roadrunner.hdmap.Junction] BarrierTypes: [0×1 roadrunner.hdmap.BarrierType] Barriers: [0×1 roadrunner.hdmap.Barrier] SignTypes: [0×1 roadrunner.hdmap.SignType] Signs: [0×1 roadrunner.hdmap.Sign] ```

Plot the map.

`plot(rrMap)`

## Input Arguments

collapse all

RoadRunner HD Map road data model, specified as a `roadrunnerHDMap` object. `rrMap` defines a simple data structure to represent road layouts using lanes, lane boundaries, lane markings, and junctions. This object provides functions that support reading, writing, and plotting HD map data.

### Name-Value Arguments

Specify optional pairs of arguments as `Name1=Value1,...,NameN=ValueN`, where `Name` is the argument name and `Value` is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example:

Handle to an `axes` object, specified as a handle object to contain the plot. If this property is not specified, the `plot` function generates a new figure.

Display lane group centers in the plot, specified as ```logical 0 (false)``` or `logical 1 (true)`. If you set `ShowLaneGroups` to `true`, then the `plot` function displays the lane group centers in the plot.

Display barrier centers in the plot, specified as ```logical 0 (false)``` or `logical 1 (true)`. If you set `ShowBarriers` to `true`, then the `plot` function displays the barrier centers in the plot.

Display signs in the plot, specified as `logical 0 (false)` or `logical 1 (true)`. If you set `ShowSigns` to `true`, then the `plot` function displays the signs in the plot.

Display static objects in the plot, specified as ```logical 0 (false)``` or `logical 1 (true)`. If you set `ShowStaticObjects` to `true`, then the `plot` function displays the static objects in the plot.

Display legend in the plot, specified as `logical 1 (true)` or `logical 0 (false)`. If you set `ShowLegend` to `false`, then the `plot` function does not displays the legend for the plot. A legend is not shown when the `Parent` name-value argument is specified.

Display line markers in the plot, specified as `logical 1 (true)` or `logical 0 (false)`. If you set `ShowLineMarkers` to `true`, then the `plot` function displays the line markers for the plot.

## Version History

Introduced in R2022b