PGRAF Call

CALL PGRAF (xy <*>, id <*>, xlabel <*>, ylabel <*>, title ) ;

The PGRAF subroutine displays a low-resolution scatter plot, sometimes called a line-printer plot. This call is part of the traditional graphics subsystem, which is no longer being developed.

The arguments to the PGRAF subroutine are as follows:

xy

is an $n \times 2$ matrix of $(x,y)$ points.

id

is an $n \times 1$ character matrix of labels for each point. The PGRAF subroutine uses up to 8 characters per point. If id is a scalar ($1 \times 1$), then the same label is used for all of the points. The label is centered over the actual point location. If you do not specify id, 'x' is the default character for labeling the points.

xlabel

is a character scalar or quoted literal that labels the $x$ axis (centered beneath the $x$ axis).

ylabel

is a character scalar or quoted literal that labels the $y$ axis (printed vertically to the left of the $y$ axis).

title

is a character scalar or quoted literal printed above the graph.

The PGRAF subroutine produces a scatter plot suitable for display on a line printer or similar device.

The following statements specify a plotting symbol, axis labels, and a title to produce the plot shown.

   xy={1 2, 3 3, 5 4, 6 2};
   call pgraf(xy,"*","X","Y","Plot of X vs Y");

                 Plot of X vs Y
    |
  4 +                             *
    |
    |
    |
Y   |
  3 +               *
    |
    |
    |
    |
  2 + *                                  *
    --+------+------+------+------+------+-
     1.0    2.0    3.0    4.0    5.0    6.0

                        X