Create primitive line
line
draws a line from the point (0,0)
to (1,1)
with
the default property settings.
line(___,
modifies the
appearance of the line using one or more name-value argument pairs. For example,
Name,Value
)'LineWidth',3
sets the line width to 3
points. Specify name-value pairs after all other input arguments. If you specify
the data using name-value pairs, for example
line('XData','x','YData','y')
, then you must specify
vector data.
line(
creates the line in the
Cartesian, polar, or geographic axes specified by ax
,___)ax
instead
of in the current axes (gca
). Specify ax
as the first input argument.
returns
all primitive pl
= line(___)Line
objects created. Use pl
to
modify properties of a specific Line
object after
it is created. For a list, see Line Properties.
Unlike the plot
function, the line
function
does not call newplot
before
plotting and does not respect the value of the NextPlot
property
for the figure or axes. It simply adds the line to the current axes
without deleting other graphics objects or resetting axes properties.
However, some axes properties, such as the axis limits, can update
to accommodate the line.