B.2 Complex numbers

The syntax used for representing complex numbers in Pyxplot differs from that used in gnuplot. Whereas gnuplot expects the real and imaginary components of complex numbers to be represented {a,b}, Pyxplot uses the syntax a+b*i, assuming that the variable i has been defined to equal sqrt(-1). In addition, in Pyxplot complex arithmetic must first be enabled using the set numerics complex command before complex numbers may be entered. This is illustrated by the following example:

gnuplot> print {1,2} + {3,4}
{4.0, 6.0}
pyxplot> set numerics complex
pyxplot> print (1+2*i) + (3+4*i)
(4+6i)