boundaryline
Syntax
Description
Use Default Boundary and Line Specification
Specify Name,Value Arguments and Axis
boundaryline(___,
plots a
boundary line specified by one or more Name,Value
)Name,Value
pairs. Adjust the
look of the boundary line with the 'Hatches'
,
'HatchLength'
, 'HatchTangency'
,
'HatchAngle'
, 'HatchSpacing'
, and
'FlipBoundary'
properties. Specify name-value pair arguments after
all other input arguments.
boundaryline(
plots a boundary line
on the specified axes ax
, ___)ax
instead of the current axes, such as that
from the gca
function.
Examples
Plot Boundary Line Sine Wave
Plot the boundary line of a sine wave.
x = linspace(0,2*pi); y = sin(x); boundaryline(x,y)
Plot Boundary Line with Third-Spaced Hatches
Plot a boundary line with third-spaced hatches. Return the boundary line object in b
.
b = boundaryline([0,1],[0,1],'Hatches','//')
b = BoundaryLine with properties: Color: [0 0 0] LineStyle: '-' LineWidth: 0.5000 Marker: 'none' MarkerFaceColor: 'none' MarkerSize: 6 HatchSpacing: 0.0125 HatchLength: 0.0300 HatchAngle: 225 Hatches: '//' HatchTangency: on FlipBoundary: off XData: [0 1] YData: [0 1] Use GET to show all properties
Plot Circle Boundary Line with Flipped Boundary
Plot a circle boundary line and flip the boundary after creation. Return the boundary line object in b
.
t = linspace(0, 2*pi); x = cos(t); y = sin(t); b = boundaryline(x,y)
b = BoundaryLine with properties: Color: [0 0 0] LineStyle: '-' LineWidth: 0.5000 Marker: 'none' MarkerFaceColor: 'none' MarkerSize: 6 HatchSpacing: 0.0255 HatchLength: 0.0300 HatchAngle: 225 Hatches: '/' HatchTangency: on FlipBoundary: off XData: [1 0.9980 0.9920 0.9819 0.9679 0.9501 0.9284 0.9029 0.8738 0.8413 0.8053 0.7660 0.7237 0.6785 0.6306 0.5801 0.5272 0.4723 0.4154 0.3569 0.2969 0.2358 0.1736 0.1108 0.0476 -0.0159 -0.0792 -0.1423 -0.2048 -0.2665 ... ] (1x100 double) YData: [0 0.0634 0.1266 0.1893 0.2511 0.3120 0.3717 0.4298 0.4862 0.5406 0.5929 0.6428 0.6901 0.7346 0.7761 0.8146 0.8497 0.8815 0.9096 0.9341 0.9549 0.9718 0.9848 0.9938 0.9989 0.9999 0.9969 0.9898 0.9788 0.9638 0.9450 ... ] (1x100 double) Use GET to show all properties
b.FlipBoundary = true
b = BoundaryLine with properties: Color: [0 0 0] LineStyle: '-' LineWidth: 0.5000 Marker: 'none' MarkerFaceColor: 'none' MarkerSize: 6 HatchSpacing: 0.0255 HatchLength: 0.0300 HatchAngle: 225 Hatches: '/' HatchTangency: on FlipBoundary: on XData: [1 0.9980 0.9920 0.9819 0.9679 0.9501 0.9284 0.9029 0.8738 0.8413 0.8053 0.7660 0.7237 0.6785 0.6306 0.5801 0.5272 0.4723 0.4154 0.3569 0.2969 0.2358 0.1736 0.1108 0.0476 -0.0159 -0.0792 -0.1423 -0.2048 -0.2665 ... ] (1x100 double) YData: [0 0.0634 0.1266 0.1893 0.2511 0.3120 0.3717 0.4298 0.4862 0.5406 0.5929 0.6428 0.6901 0.7346 0.7761 0.8146 0.8497 0.8815 0.9096 0.9341 0.9549 0.9718 0.9848 0.9938 0.9989 0.9999 0.9969 0.9898 0.9788 0.9638 0.9450 ... ] (1x100 double) Use GET to show all properties
Plot Dashed and Dotted Square Boundary Line in Red
Plot a red, dotted and dashed, square boundary line on a specified axis a
is the current axis.
a = gca;
boundaryline(a,[0,1,1,0,0],[0,0,1,1,0],'r-.')
Input Arguments
x
— x coordinate data
numeric vector
x coordinate data, specified as a numeric vector. The function uses this data to plot the x coordinates of the boundary line.
Data Types: double
y
— y coordinate data
numeric vector
y coordinate data, specified as a numeric vector. The function uses this data to plot the y coordinates of the boundary line.
Data Types: double
ax
— Valid axes
scalar handle
Valid axes, specified as a scalar handle. By default, this function plots to the
current axes, obtainable with the gca
function.
Data Types: double
LineSpec
— Line style, marker, and color
string scalar | character vector
Line style, marker, and color, specified as a string scalar or character vector containing symbols. The symbols can appear in any order. You do not need to specify all three characteristics (line style, marker, and color). For example, if you omit the line style and specify the marker, then the plot shows only the marker and no line.
Example: "--or"
is a red dashed line with circle markers.
Line Style | Description | Resulting Line |
---|---|---|
"-" | Solid line |
|
"--" | Dashed line |
|
":" | Dotted line |
|
"-." | Dash-dotted line |
|
Marker | Description | Resulting Marker |
---|---|---|
"o" | Circle |
|
"+" | Plus sign |
|
"*" | Asterisk |
|
"." | Point |
|
"x" | Cross |
|
"_" | Horizontal line |
|
"|" | Vertical line |
|
"square" | Square |
|
"diamond" | Diamond |
|
"^" | Upward-pointing triangle |
|
"v" | Downward-pointing triangle |
|
">" | Right-pointing triangle |
|
"<" | Left-pointing triangle |
|
"pentagram" | Pentagram |
|
"hexagram" | Hexagram |
|
Color Name | Short Name | RGB Triplet | Appearance |
---|---|---|---|
"red" | "r" | [1 0 0] |
|
"green" | "g" | [0 1 0] |
|
"blue" | "b" | [0 0 1] |
|
"cyan"
| "c" | [0 1 1] |
|
"magenta" | "m" | [1 0 1] |
|
"yellow" | "y" | [1 1 0] |
|
"black" | "k" | [0 0 0] |
|
"white" | "w" | [1 1 1] |
|
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: 'Hatches','//'
Note
These properties are only a subset. For a full list, see Line Properties.
Hatches
— Hatch style
'/'
(default) | '\'
| '|'
Hatch style, specified as '/'
, '\'
, or
'|'
. The length of the string determines the hatch spacing. The
more hatches specified, the closer the spacing. For example:
For half-spaced forward slants, use
'Hatches','//'
.For a single-spaced perpendicular slant, use
'Hatches','|'
.For third-spaced backward slants, use
'Hatches','\\\'
.
Data Types: char
| string
FlipBoundary
— Flip boundary hatch angle
'off'
(default) | 'on'
Flip boundary hatch angle by 180 degrees, specified as 'off'
or
'on'
.
'off'
— Do not flip the hatch angle.'on'
— Flip the hatch angle by 180 degrees.
Data Types: char
| string
HatchTangency
— Hatch angle tangency
'on'
(default) | 'off'
Hatch angle tangency, specified as 'on'
or
'off'
.
'on'
— Hatch angle is relative to the tangent of the line segment. The function determines the tangency by evaluating the line integral traversing from the start to the end of the x and y data.'off'
— Hatch angle is relative to 0.
Data Types: char
| string
HatchLength
— Length of hatch segments
numeric scalar
Length of hatch segments, specified as a numeric scalar.
Data Types: double
HatchAngle
— Angle of hatch segments
numeric scalar
Angle of hatch segments, specified as a numeric scalar. The function automatically
calculates the hatch angle if you specify a style for
'Hatches'
.
Data Types: char
| string
HatchSpacing
— Spacing between hatch segments
numeric scalar
Spacing between hatch segments, specified as a numeric scalar.
Data Types: char
| string
LineStyle
— Line style
"-"
(default) | "--"
| ":"
| "-."
| "none"
Line style, specified as one of the options listed in this table.
Line Style | Description | Resulting Line |
---|---|---|
"-" | Solid line |
|
"--" | Dashed line |
|
":" | Dotted line |
|
"-." | Dash-dotted line |
|
"none" | No line | No line |
LineWidth
— Line width
0.5
(default) | positive value
Line width, specified as a positive value in points, where 1 point = 1/72 of an inch. If the line has markers, then the line width also affects the marker edges.
The line width cannot be thinner than the width of a pixel. If you set the line width to a value that is less than the width of a pixel on your system, the line displays as one pixel wide.
Output Arguments
bline
— boundary line object
Aero.graphics.primitive.BoundaryLine
object
Boundary line object, returned as an
Aero.graphics.primitive.BoundaryLine
object.
Version History
Introduced in R2021b
See Also
altitudeEnvelopeContour
| line
| shortPeriodCategoryAPlot
| shortPeriodCategoryBPlot
| shortPeriodCategoryCPlot
| plot
| contour
| gca
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 (한국어)