Function: plotinit
Section: graphic
C-Name: plotinit
Prototype: vLDGDGD0,L,
Help: plotinit(w,{x},{y},{flag=0}): initialize rectwindow w to size x,y.
 If flag!=0, x and y express fractions of the size of the current output
 device. Omitting x or y means use the full size of the device.
Doc: initialize the rectwindow $w$,
 destroying any rect objects you may have already drawn in $w$. The virtual
 cursor is set to $(0,0)$. The rectwindow size is set to width $x$ and height
 $y$; omitting either $x$ or $y$ means we use the full size of the device
 in that direction.
 If $\fl=0$, $x$ and $y$ represent pixel units. Otherwise, $x$ and $y$
 are understood as fractions of the size of the current output device (hence
 must be between $0$ and $1$) and internally converted to pixels.

 The plotting device imposes an upper bound for $x$ and $y$, for instance the
 number of pixels for screen output. These bounds are available through the
 \tet{plothsizes} function. The following sequence initializes in a portable
 way (i.e independent of the output device) a window of maximal size, accessed
 through coordinates in the $[0,1000] \times [0,1000]$ range:

 \bprog
 s = plothsizes();
 plotinit(0, s[1]-1, s[2]-1);
 plotscale(0, 0,1000, 0,1000);
 @eprog
