polarplot
Plot line in polar coordinates
Syntax
Description
Vector and Matrix Data
polarplot(
plots a line in polar coordinates, with theta
,rho
)theta
indicating the
angle in radians and rho
indicating the radius value for each
point. The inputs must be vectors of equal length or matrices of equal size. If
the inputs are matrices, then polarplot
plots columns of
rho
versus columns of theta
.
Alternatively, one of the inputs can be a vector and the other a matrix as long
as the vector is the same length as one dimension of the matrix.
Table Data
polarplot(
plots the variables tbl
,thetavar
,rhovar
)thetavar
and rhovar
from the table tbl
. To plot one data set, specify one
variable for thetavar
and one variable for
rhovar
. To plot multiple data sets, specify multiple
variables for thetavar
, rhovar
, or both.
If both arguments specify multiple variables, they must specify the same number
of variables. (since R2022a)
Additional Options
polarplot(
uses
the pax
,___)PolarAxes
object specified by
pax
, instead of the current axes.
polarplot(___,
specifies properties of the chart line using one or more
Name,Value
)Name,Value
pair arguments. The property settings apply to
all the lines. You cannot specify different property values for different lines
using Name,Value
pairs.
returns one or more chart line objects. Use p
= polarplot(___)p
to set
properties of a specific chart line object after it is created. For a list of
properties, see Line Properties.
Examples
Input Arguments
Tips
To convert data from degrees to radians, use
deg2rad
. To convert data from radians to degrees, userad2deg
.You can modify polar axes properties to customize the chart. For a list of properties, see PolarAxes Properties.
To plot additional data in the polar axes, use the
hold on
command. However, you cannot plot data that requires Cartesian axes in a polar chart.