Defining the Window

The window must be defined after the viewport in order to map the world coordinate rectangle into the viewport rectangle. The routine plwind is used to specify the rectangle in world-coordinate space. For example, if we wish to plot a graph showing the collector current IC as a function of the collector to emitter voltage VCE for a transistor where 0≤IC≤10.0 mA and 0≤VCE≤12.0 V, we would call the function plwind as follows:

plwind(0.0,12.0,0.0,10.0);
Note that each of the arguments is a floating point number, and so the decimal points are required. If the order of either the X limits or Y limits is reversed, the corresponding axis will point in the opposite sense, (i.e., right to left for X and top to bottom for Y). The window must be defined before any calls to the routines which actually draw the data points. Note however that plwind may also be called to change the window at any time. This will affect the appearance of objects drawn later in the program, and is useful for drawing two or more graphs with different axes on the same piece of paper.