Main Content


Surface plotter object belonging to theater plot

Since R2022b


SurfacePlotter defines a surface plotter object belonging to a theaterPlot object. Use the plotSurface function to plot surfaces using the SurfacePlotter object.


Create a SurfacePlotter objects using the surfacePlotter object function of the theaterPlot object.


expand all

Plot name to display in legend, specified as a character vector or string scalar. If you do not specify this argument, the function does not display a plot name.

Tag associated with the plotter, specified as a character vector or string. You can use the findPlotter function to identify plotters based on their tag. The default value is 'PlotterN', where N is an integer that corresponds to the Nth plotter associated with the theaterPlot.

Face alpha value for all plotted surfaces, specified as a scalar in the range [0 1].

Edge color for all plotted surfaces, specified as a character vector of a valid color, a string scalar of a valid color, an RGB triplet, or a hexadecimal color code.


collapse all

Create a radar scenario.

scenario = radarScenario;

Define the terrain and boundaries of two surfaces and add the two surfaces to the radar scenario.

terrain1 = randi(100,4,5);
terrain2 = randi(100,3,3);
boundary1 = [0 100;
    0 100-eps];
boundary2 = [0 100;
    100 200];
s1 = landSurface(scenario,Terrain=terrain1,Boundary=boundary1);
s2 = landSurface(scenario,Terrain=terrain2,Boundary=boundary2);

Obtain the plotter data by using the surfacePlotterData function.

plotterData = surfacePlotterData(scenario.SurfaceManager)
plotterData=1×2 struct array with fields:

Create a theaterPlot object and specify the axis limits of the plot.

theaterpplot = theaterPlot(XLimits=[0 100],YLimits=[-50 250],ZLimits=[-100 100]);

Create a surface plotter.

plotter = surfacePlotter(theaterpplot,DisplayName="Surfaces");

Plot surfaces in the theater plot. Change view angles for better visualization.


Version History

Introduced in R2022b