Polar

The set polar command changes the meaning of the plot from rectangular coordinates to polar coordinates.

Syntax:

     set polar
     unset polar
     show polar

In polar coordinates, the dummy variable (t) represents an angle theta. The default range of t is [0:2*pi], or [0:360] if degree units have been selected (see set angles (p. [*])).

The command unset polar changes the meaning of the plot back to the default rectangular coordinate system.

The set polar command is not supported for splots. See the set mapping (p. [*]) command for similar functionality for splot (p. [*])s.

While in polar coordinates the meaning of an expression in t is really r = f(t), where t is an angle of rotation. The trange controls the domain (the angle) of the function. The r, x and y ranges control the extent of the graph in the x and y directions. Each of these ranges, as well as the rrange, may be autoscaled or set explicitly. For details, see set rrange (p. [*]) and set xrange (p. [*]).

Example:

     set polar
     plot t*sin(t)
     set trange [-2*pi:2*pi]
     set rrange [0:3]
     plot t*sin(t)

The first plot uses the default polar angular domain of 0 to 2*pi. The radius and the size of the graph are scaled automatically. The second plot expands the domain, and restricts the size of the graph to the area within 3 units of the origin. This has the effect of limiting x and y to [-3:3].

By default polar plots are oriented such that theta=0 is at the far right, with theta increasing counterclockwise. You can change both the origin and the sense explicitly. See set theta (p. [*]).

You may want to set size square to have gnuplot try to make the aspect ratio equal to unity, so that circles look circular. Tic marks around the perimeter can be specified using set ttics. See also http://www.gnuplot.info/demo/polar.htmlpolar demos (polar.dem)

and http://www.gnuplot.info/demo/poldat.htmlpolar data plot (poldat.dem).