A simple example

In this section:

In our first example we create a window and draw a quadratic curve within it.

      INTEGER N,winio@,i
      REAL*8 x(N),y(N)
c--Create the data to be plotted.
      DO i=1,N
c--Plot the data.

%pl (SIMPLEPLOT Graphics Region) is like %gr (Graphics Region) and takes the basic form:


width and height represent the pixel dimensions of a SIMPLEPLOT graphics region within the window. Some of the options take additional arguments. In this example, the option called x_array takes three arguments namely the number of points N followed by an array of x co-ordinates and an array of y co-ordinates.

Following the usual ClearWin+ convention, all real data is passed as DOUBLE PRECISION values. However, SIMPLEPLOT uses single precision, so data values should not exceed the single precision range.



Copyright © 1999-2024 Silverfrost Limited