Main Content

clearData

Clear data from specific plotter of theater plot

Description

clearData(pl) clears data belonging to the plotter pl associated with a theater plot. This function clears data from plotters created by the following plotter methods:

example

Examples

collapse all

Create a theater plot. Add a track plotter and detection plotter to the theater plot.

tp = theaterPlot('XLim',[0,90],'YLim',[-35,35]);
tPlotter = trackPlotter(tp,'DisplayName','Tracks');
radarPlotter = detectionPlotter(tp,'DisplayName','Radar Detections');

Figure contains an axes object. The axes object with xlabel X (m), ylabel Y (m) contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent Tracks, Radar Detections.

Plot a set of tracks in the track plotter.

trackPos = [30, 15, 1; 60, -15, 1; 20, 5, 1];
trackLabels = {'T1','T2','T3'};
plotTrack(tPlotter, trackPos, trackLabels)

Figure contains an axes object. The axes object with xlabel X (m), ylabel Y (m) contains 5 objects of type line, text. One or more of the lines displays its values using only markers These objects represent Tracks, Radar Detections.

Plot a set of detections in the detection plotter.

detPos = [30, 5, 4; 30, -10, 2; 50, 15, 1];
detLabels = {'R1','R2','R3'};
plotDetection(radarPlotter, detPos, detLabels)

Figure contains an axes object. The axes object with xlabel X (m), ylabel Y (m) contains 8 objects of type line, text. One or more of the lines displays its values using only markers These objects represent Tracks, Radar Detections.

Delete the track plotter data.

clearData(tPlotter)

Figure contains an axes object. The axes object with xlabel X (m), ylabel Y (m) contains 5 objects of type line, text. One or more of the lines displays its values using only markers These objects represent Tracks, Radar Detections.

Input Arguments

collapse all

Specific plotter belonging to a theater plot, specified as a plotter handle of theaterPlot.

Version History

Introduced in R2018b