SurfacePlotter
Description
SurfacePlotter
defines a surface plotter object belonging to a
theaterPlot
object. Use the
plotSurface
function to
plot surfaces using the SurfacePlotter
object.
Creation
Create a SurfacePlotter
objects using the
surfacePlotter
object function of the theaterPlot
object.
Properties
DisplayName
— Plot name to display in legend
character vector | string scalar
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
— Tag associated with plotter
'PlotterN'
(default) | character vector | string
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
.
FaceAlpha
— Face alpha value for all plotted surfaces
1
(default) | scalar in range [0 1]
Face alpha value for all plotted surfaces, specified as a scalar in the range
[0 1]
.
EdgeColor
— Edge color for all plotted surfaces
'black'
(default) | character vector | string scalar | RGB triplet | hexadecimal color code
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.
Examples
Plot Surface in Theater Plot in Radar Scenario
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:
X
Y
Z
C
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.
plotSurface(plotter,plotterData) view(-41,29)
Version History
Introduced in R2022b
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 (한국어)