create a plot in polar coordinates with polar axes
polarplot(expr, theta=a1..a2, opts)
polarplot(f, a1..a2, opts)
polarplot(v1, v2, opts)
expression in theta
procedure or operator
(optional) real constants
Matrix or list of lists
Vectors or lists
Direction of increasing angle. This can be counterclockwise or clockwise, with the first being the default.
Angular units used for display. This can be radians or degrees, with the first being the default.
Location of the angular origin, right, top, left, or bottom, with the first being the default.
Options for the radial axis, see plot/axis for details.
Options for the angular axis, see plot/axis for details.
Style of coordinate axes, polar or cartesian, with polar being the default.
View specified in the polar coordinate system, consisting of a list [r1..r2, a1..a2] where r1..r2 is the radial range and a1..a2 is the angular range.
Ordering of radial and angular coordinates, affecting input of data only. This option allows you to reverse the ordering of data input. The default is ordering=[radial,angular]. To plot points that have the first coordinate equal to the angle, use ordering=[angular,radial].
A negative value representing the start of the radial range.
The polarplot command creates a plot in polar coordinates with polar axes.
In the first calling sequence, the first argument expr is an expression of the form r(theta). This produces a curve with points [r(theta), theta], where theta is the angle and r is the radius. The second argument is optional and if omitted, the default range is 0..2*Pi.
The second calling sequence uses operator form. The first argument is a procedure or operator that has a single input parameter representing the angle and returns the associated radius value. As with the first calling sequence, the second argument is optional and defaults to 0..2*Pi.
The third and fourth calling sequences allow points in the form [r, theta] to be given to the polarplot command. Here, m is an n-by-2 matrix or a list of n two-element lists, while v1 and v2 are n-dimensional vectors holding the r and theta values respectively. The n points are connected to produce a curve. To generate points only, add the style=point option.
The calling sequences for the polarplot command are similar to those for the plot command, though not all features of the plot command are available. You may find it helpful to read the plot help page for more information on advanced usage.
Options listed here are available for controlling the display of the angular and radial axes. All other options are the same ones available for general 2-D plots but not all of those options are applicable to polar plots. See the plot/options help page for more details.
All options that relate to axes are applied to the radial and angular axes. Note that the radial axis is considered the first axis and the angular axis the second. Options axis[radial] and axis[angular] are equivalent to the general plot options axis and axis. However, the view option continues to refer to the view in Cartesian coordinates.
The radialstart=r0 option allows you to use a negative value as the starting radius value at the center of the plot. This option is meant to provide a mechanism for using negative values for the radius. To restrict the view of the plot to radius values greater than r0, a positive value, use the coordinateview option.
The mode=log suboption cannot be used with the angular axis, and it cannot be used with the radial axis when the radialstart option is provided.
To get a polar plot on Cartesian axes instead of polar axes, use the axiscoordinates=cartesian option.
Multiple polar plots may be created by using a list of expressions or data sets as the first value. Polar plots may also be combined into a single plot using the plots:-display command. However, merging polar plots created with different options or merging polar and cartesian plots can lead to unpredictable results.
Polar axes are not available for all interfaces and devices. For more information, see plot/interface.
Plot the origin-centered circle of radius 1, described by r⁡θ=1.
Plot r⁡θ=θ and change the radial axis to blue.
Plot two parametrically defined curves, the first in red and the second in blue.
Define procedures S and R as shown below. Then plot the parametric curve with first component R and second component t->t.
S ≔ t→100100+t−Pi28:
R ≔ t→S⁡t⁢2−sin⁡7⁢t−cos⁡30⁢t2:
The command to create the plot from the Plotting Guide is a parametrically defined curve given by r=cos⁡t, θ=sin⁡t.
Download Help Document