next up previous contents index
Next: Arrow Up: Set-show Previous: Set-show   Contents   Index


Angles

By default, gnuplot assumes the independent variable in polar graphs is in units of radians. If set angles degrees is specified before set polar, then the default range is [0:360] and the independent variable has units of degrees. This is particularly useful for plots of data files. The angle setting also applies to 3-d mapping as set via the set mapping command.

Syntax:

     set angles {degrees | radians}
     show angles

The angle specified in set grid polar is also read and displayed in the units specified by set angles.

set angles also affects the arguments of the machine-defined functions sin(x), cos(x) and tan(x), and the outputs of asin(x), acos(x), atan(x), atan2(x), and arg(x). It has no effect on the arguments of hyperbolic functions or Bessel functions. However, the output arguments of inverse hyperbolic functions of complex arguments are affected; if these functions are used, set angles radians must be in effect to maintain consistency between input and output arguments.


     x={1.0,0.1}
     set angles radians
     y=sinh(x)
     print y         #prints {1.16933, 0.154051}
     print asinh(y)  #prints {1.0, 0.1}

but
     set angles degrees
     y=sinh(x)
     print y         #prints {1.16933, 0.154051}
     print asinh(y)  #prints {57.29578, 5.729578}

See also

http://www.gnuplot.info/demo/poldat.htmlpoldat.dem: polar plot using set angles demo.


next up previous contents index
Next: Arrow Up: Set-show Previous: Set-show   Contents   Index
Ethan Merritt 2007-03-03