trajectoryPlotter
Description
creates a trajectory plotter for use with the theater plot trajPlotter
= trajectoryPlotter(tp
)tp
.
creates a trajectory plotter with additional options specified by one or more
trajPlotter
= trajectoryPlotter(tp
,Name,Value
)Name,Value
pair arguments.
Examples
Plot Trajectories in Theater Plot
Define the coordinates for three trajectories.
coordinates1 = [(1:10)' (2:11)' (11:-1:2)']; coordinates2 = coordinates1 + 1; coordinates3 = coordinates1 + 2;
Create a theaterPlot
object, set the view angles, and create a trajectoryPlotter
object.
tp = theaterPlot;
view(14,50)
trajPlotter = trajectoryPlotter(tp,DisplayName="Trajectories");
Plot the three trajectories.
plotTrajectory(trajPlotter,{coordinates1,coordinates2,coordinates3})
Input Arguments
tp
— Theater plot
theaterPlot
object
Theater plot, specified as a theaterPlot
object.
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.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'LineStyle','--'
DisplayName
— Plot name to display in legend
character vector | string scalar
Plot 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'
Color
— Trajectory color
'gray'
(default) | character vector | string scalar | RGB triplet | hexadecimal color code
Trajectory color, specified as the comma-separated pair consisting of
'Color'
and a character vector, a string scalar, an RGB
triplet, or a hexadecimal color code.
LineStyle
— Line style
':'
(default) | '-'
| '--'
| '-.'
Line style used to plot the trajectory, specified as one of these values.
Value | Description |
---|---|
':' | Dotted line (default) |
'-' | Solid line |
'--' | Dashed line |
'-.' | Dash-dotted line |
LineWidth
— Line width
0.5
(default) | positive scalar
Line width of the trajectory, specified in points size as the comma-separated pair
consisting of 'LineWidth'
and a positive scalar.
Tag
— Tag to associate with the plotter
'PlotterN'
(default) | character vector | string scalar
Tag 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
.
Version History
Introduced in R2021a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)