Contenuto principale

plot

Display RF propagation data in Site Viewer

Description

plot(pd) displays data from the specified propagation data object in the current Site Viewer. The function displays each data point as a circular marker that is colored according to the corresponding value.

plot(___,Name=Value) specifies options using name-value arguments.

example

Examples

collapse all

Launch Site Viewer with basemaps and building files for Manhattan. For more information about the OpenStreetMap® file, see [1].

viewer = siteviewer("Basemap","streets_dark",...
        "Buildings","manhattan.osm");

Show a transmitter site on a building.

tx = txsite("Latitude",40.7107,...
        "Longitude",-74.0114,...
        "AntennaHeight",80);
show(tx)

Create receiver sites along nearby streets.

latitude = [linspace(40.7088, 40.71416, 50), ...
        linspace(40.71416, 40.715505, 25), ...
        linspace(40.715505, 40.7133, 25), ...
        linspace(40.7133, 40.7143, 25)]';
longitude = [linspace(-74.0108, -74.00627, 50), ...
        linspace(-74.00627 ,-74.0092, 25), ...
        linspace(-74.0092, -74.0110, 25), ...
        linspace(-74.0110, -74.0132, 25)]';
rxs = rxsite("Latitude", latitude, "Longitude", longitude);

Compute signal strength at each receiver location.

signalStrength = sigstrength(rxs, tx)';

Create a propagationData object to hold computed signal strength data.

tbl = table(latitude, longitude, signalStrength);
pd = propagationData(tbl);

Plot the signal strength data on a map as colored points.

legendTitle = "Signal" + newline + "Strength" + newline + "(dB)";
plot(pd, "LegendTitle", legendTitle, "Colormap", parula);

Appendix

[1] The OpenStreetMap file is downloaded from https://www.openstreetmap.org, which provides access to crowd-sourced map data all over the world. The data is licensed under the Open Data Commons Open Database License (ODbL), https://opendatacommons.org/licenses/odbl/.

Input Arguments

collapse all

Propagation data, specified as a propagationData object.

Name-Value Arguments

collapse all

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.

Example: plot(pd,Type="power") specifies the type as "power".

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: plot(pd,"Type","power") specifies the type as "power".

Data variable to plot, specified as a character vector or a string scalar. The data variable must correspond to a variable name of the table used to create the propagationData object. The default value corresponds to the DataVariableName property of the propagationData object.

Data Types: char | string

Type of value to plot, specified as "custom", "power", "efield", "sinr", or "pathloss". This table shows the default color limits and legend title for each type.

TypeColor limitsLegend title
"custom"[min(Data) max(Data)]''
"power"[-120 -5]Power (dBm)
"efield"[20 135]E-field (dBuV/m)
"sinr"[-5 20]SINR (dB)
"pathloss"[45 160]Path loss (dB)

Data Types: char | string

Data value levels to plot, specified as a numeric vector. The function uses this argument to bin the propagation data. When plotting, the function selects the colors the bins by using the Colors argument, if specified, or else the Colormap and ColorLimits arguments. The function does not display data points with values below the minimum level.

Data Types: double

Colors of the data points, specified as an M-by-3 array of RGB triplets, an array of string scalars, or a cell array of character vectors. The function assigns the colors to the corresponding values specified by the Levels argument.

The Colors argument cannot be combined with the Colormap or ColorLimits arguments.

Data Types: double | char | string

Colormap for coloring the points, specified as a colormap name or as an M-by-3 array of RGB triplets that define M individual colors.

This table lists the colormap names.

Colormap NameColor Scale

parula

Colorbar showing the colors of the parula colormap. The colormap starts at dark blue and transitions to lighter blue, green, orange and yellow. The transitions between colors are more perceptually uniform than in most other colormaps.

turbo

Colorbar showing the colors of the turbo colormap. The colormap starts at dark blue and transitions to lighter blue, bright green, orange, yellow, and dark red. This colormap is similar to jet, but the transitions between colors are more perceptually uniform than in jet.

hsv

Colorbar showing the colors of the hsv colormap. The colormap starts at red and transitions to yellow, bright green, cyan, dark blue, magenta, and bright orange.

hot

Colorbar showing the colors of the hot colormap. The colormap starts at dark red and transitions to bright red, orange, yellow, and white.

cool

Colorbar showing the colors of the cool colormap. The colormap starts at cyan and transitions to light blue, light purple, and magenta.

spring

Colorbar showing the colors of the spring colormap. The colormap starts at magenta and transitions to pink, light orange, and yellow.

summer

Colorbar showing the colors of the summer colormap. The colormap starts at medium green and transitions to yellow.

autumn

Colorbar showing the colors of the autumn colormap. The colormap starts at bright orange and transitions to yellow.

winter

Colorbar showing the colors of the winter colormap. The colormap starts at dark blue and transitions to bright green.

gray

Colorbar showing the gray colormap. The colormap starts at black and transitions to white.

bone

Colorbar showing the bone colormap. This colormap has colors that are approximately gray with a slight blue color tint. The colormap starts at dark gray and transitions to white.

copper

Colorbar showing the copper colormap. This colormap starts at black and transitions to a medium orange, similar to the color of copper.

pink

Colorbar showing the pink colormap. This colormap starts at dark red and transitions to dark pink, tan, and white.

sky (since R2023a)

Colorbar showing the sky colormap. This colormap starts at a very light shade of blue and transitions to a darker shade of blue.

abyss (since R2023b)

Colorbar showing the abyss colormap. This colormap starts at a very dark shade of blue and transitions to a lighter shade of blue.

nebula (since R2025a)

Colorbar showing the nebula colormap. This colormap starts at a medium shade of blue and transitions to a bright shade of red.

jet

Colorbar showing the colors of the jet colormap. The colormap starts at dark blue and transitions to light blue, bright green, orange, yellow, and dark red.

lines

Colorbar showing the colors of the lines colormap. The colormap contains a repeating pattern of colors: dark blue, dark orange, dark yellow, dark purple, medium green, light blue, and dark red.

colorcube

Colorbar showing the colors of the colorcube colormap. The colormap is a course sampling of the RGB colorspace.

prism

Colorbar showing the colors of the prism colormap. The colormap contains a repeating pattern of colors: red, orange, yellow, green, blue, and purple.

flag

Colorbar showing the colors of the flag colormap. The colormap contains a repeating pattern of colors: red, white, blue, and black.

white

Colorbar showing the white colormap, which is entirely white.

The Colormap argument cannot be used with the Colors argument.

Data Types: double | char | string

Color limits for the colormap, specified as a two-element vector of the form [min max]. The color limits indicate the data level values that map to the first and last colors in the colormap.

The ColorLimits argument cannot be used with the Colors argument.

Data Types: double

Size of the data markers plotted on the map, specified as a positive numeric scalar in pixels.

Data Types: double

Show the color legend on the map, specified as true or false.

Data Types: logical

Title of the color legend, specified as a character vector or a string scalar.

Data Types: string | char

Map for the surface data, specified as a siteviewer object.1 The default value is the current Site Viewer or a new Site Viewer, if none is open.

Data Types: char | string

Version History

Introduced in R2020a

See Also

Functions

Objects


1 Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.