The set polar command changes the meaning of the plot from rectangular coordinates to polar coordinates. In polar coordinates, the dummy variable (x) is an angle. The range of this angle is changed from whatever it was to [0:2*pi], or, if degree unit has been selected, to [0:360] (see set angles).
The command set nopolar changes the meaning of the plot back to the default rectangular coordinate system. The range of x is changed from whatever it was to [-10:10].
The set polar command is not supported for splots. See the set mapping command for similar functionality for splots.
While in polar coordinates the meaning of an expression in x is really r = f(x), where x is an angle of rotation. The xrange controls the domain (the angle) of the function, and the yrange controls the range (the radius). The plot is plotted in a rectangular box, and the x and y axes are both in units of the radius. Thus, the yrange controls both dimensions of the plot output. The tics and units are written along the axes rather than at the left and bottom. These unit are offset by <rmin> specified by the rrange (See set rrange). It is not possible to specify different output dimensions in the x or y directions. The yrange can be used to shift the plot diagonally to display only the first or third quadrants.
Syntax:
set polar set nopolar show polarExample:
set polar plot x*sin(x) plot [-2*pi:2*pi] [-3:3] x*sin(x)The first plot uses the default polar angular domain of 0 to 2*pi. The radius (and the size of the plot) is scaled automatically. The second plot expands the domain, and restricts the range of the radius (and the size of the plot) to [-3:3].