Create platform plotter
creates a platform plotter for use with the theater plot, pPlotter
= platformPlotter(tp
)tp
.
creates a platform plotter with additional options specified by one or more
pPlotter
= platformPlotter(tp
,Name,Value
)Name,Value
pair arguments.
Create a theater plot.
tp = theaterPlot('XLim',[0,90],'YLim',[-35,35],'ZLim',[1,10]);
Create a platform plotter with the name 'Platforms'
.
plotter = platformPlotter(tp,'DisplayName','Platforms');
Update the theater plot with three platforms labeled, 'R1'
, 'R2'
, and 'R3'
. Position the three platforms, in units of meters, at , , and , with corresponding velocities (in m/s) of , , and , respectively.
positions = [30, 5, 4; 30, -10, 2; 30, 15, 1]; velocities = [-10, 0, 2; -10, 3, 1; -10, -4, 1]; labels = {'R1','R2','R3'}; plotPlatform(plotter, positions, velocities, labels);
tp
— Theater plottheaterPlot
objectTheater plot, specified as a theaterPlot
object.
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
'MarkerSize',10
'DisplayName'
— Plot name to display in legendPlot name to display in legend, specified as the comma-separated pair consisting of 'DisplayName'
and a character vector or string scalar. If no name is specified, no entry is shown.
Example: 'DisplayName','Radar Detections'
'Marker'
— Marker symbol'^'
(default) | character vector | string scalarMarker symbol, specified as the comma-separated pair consisting of
'Marker'
and one of these values.
Value | Description |
---|---|
'o' | Circle |
'+' | Plus sign |
'*' | Asterisk |
'.' | Point |
'x' | Cross |
'_' | Horizontal line |
'|' | Vertical line |
'square' or 's' | Square |
'diamond' or 'd' | Diamond |
'^' | Upward-pointing triangle |
'v' | Downward-pointing triangle |
'>' | Right-pointing triangle |
'<' | Left-pointing triangle |
'pentagram' or 'p' | Five-pointed star (pentagram) |
'hexagram' or 'h' | Six-pointed star (hexagram) |
'none' | No markers |
'MarkerSize'
— Size of marker6
| positive integerSize of marker, specified as the comma-separated pair consisting of
'MarkerSize'
and a positive integer in points.
'MarkerEdgeColor'
— Marker outline color'black'
(default) | character vector | string scalar | RGB triplet | hexadecimal color codeMarker outline color, specified as the comma-separated pair consisting of
'MarkerEdgeColor'
and a character vector, a string scalar, an
RGB triplet, or a hexadecimal color code.
'MarkerFaceColor'
— Marker fill color'none'
(default) | character vector | string scalar | RGB triplet | hexadecimal color codeMarker outline color, specified as the comma-separated pair consisting of
'MarkerFaceColor'
and a character vector, a string scalar, an
RGB triplet, a hexadecimal color code, or 'none'
. The default is
'none'
.
'FontSize'
— Font size for labeling platforms10
(default) | positive integerFont size for labeling platforms, specified in font points size as the
comma-separated pair consisting of 'FontSize'
and a positive
integer.
'LabelOffset'
— Gap between label and positional point[0 0 0]
(default) | three-element row vectorGap between label and positional point it annotates, specified as the
comma-separated pair consisting of 'LabelOffset'
and a
three-element row vector. Specify the [x
y
z] offset in meters.
'VelocityScaling'
— Scale factor for magnitude length of velocity vectors1
(default) | positive scalarScale factor for magnitude length of velocity vectors, specified as the
comma-separated pair consisting of 'VelocityScaling'
and a
positive scalar. The plot renders the magnitude vector value as VK,
where V is the magnitude of the velocity in meters per second, and
K is the value of VelocityScaling
.
'Tag'
— Tag to associate with the plotter'PlotterN'
(default) | character vector | string scalarTag to associate with the plotter, specified as the comma-separated pair
consisting of 'Tag'
and a character vector or string scalar. The
default value is 'PlotterN'
, where
N is an integer that corresponds to the Nth
plotter associated with the theaterPlot
.
Tags provide a way to identify plotter objects, for example when searching using
findPlotter
.
You have a modified version of this example. Do you want to open this example with your edits?