# VOPL

Section: C Library Functions (3)
Updated: 06 June 1989

## NAME

VOPL - A very ordinary plotting library.

## DESCRIPTION

VOPL is a library of C routines for doing graph plots. It handles a variety of fits and scalings, together with providing defaults for positioning graph titles, axis titles, and labels. VOPL may be called from C or FORTRAN.

Adjust the auto scaling on the axis for the points in points.
```
Fortran:
real points(number)
integer number
character *1 axis

C:
float   points[];
int     number;
char    axis;

```
vp_range(min, max, axis)
Specify the range min to max for the the axis.
```
Fortran:
subroutine vp_range(min, max, axis)
real min, max
character *1 axis

C:
vp_range(min, max, axis)
float   min, max;
char    axis;

```
vp_graphtitle(title)
Specify the title for the graph.
```
Fortran:
subroutine vp_graphtitle(title)
character*(*) title

C:
vp_graphtitle(title)
char    *title;

```
vp_drawtitle()
Draw the graph title. Note: this is done by vp_drawaxes2, and vp_drawaxes.
```
Fortran:
subroutine vp_drawtitle()

C:
vp_drawtitle()

```
vp_axistitle(title, axis)
Specify the title for the axis.
```
Fortran:
subroutine vp_axistitle(title, axis)
character*(*) title
character *1 axis

C:
vp_axistitle(title, axis)
char    *title, axis;

```
vp_plot2(x, y, n)
Plot the n points in the array x and y.
```
Fortran:
subroutine vp_plot2(x, y, n)
real x(n),
y(n)
integer n

C:
vp_plot2(x, y, n)
float   x[], y[];
int     n;

```
vp_fit(type)
Specify the fit type used to plot the data. Default straight line fit.
```
Fortran:
subroutine vp_fit(type)
integer type

C:
vp_fit(type)
int type;

Current vp_fit types are:

0       -       No lines at all.
1       -       Straight line fit.
2       -       Cubic spline fit.
3       -       Least squares fit.
4       -       Power equation fit.
5       -       Saturated growth rate fit.

```
vp_scaling(type, axis)
Specify the scaling type for the axis. Default linear.
```
Fortran:
subroutine vp_scaling(type, axis)
integer type
character *1 axis

C:
vp_scaling(type, axis)
int     type;
char    axis;

```
Current scaling types are 0 for
linear scaling, 1 for logarithmic scaling.
vp_endslopes(a, b)
Specify the endslopes for a cubic spline fit.
```
Fortran:
subroutine vp_endslopes(a, b)
real a, b

C:
vp_endslopes(a, b)
float   a, b;

```
vp_degree(deg)
Specify the degree for the least-squares fit. Default 3.
```
Fortran:
subroutine vp_degree(deg)
integer deg

C:
vp_degree(deg)
int     deg;

```
vp_gridspacing(n, axis)
Specify at what n'th tickmarks the grid should be drawn at. Default zero (no grid).
```
Fortran:
subroutine vp_gridspacing(n, axis)
integer n
character *1 axis

C:
vp_gridspacing(n, axis)
int     n;
char    axis;

```
vp_tickmarks(number, axis)
Specify the number of tickmarks on the axis.
```
Fortran:
subroutine vp_tickmarks(number, axis)
integer number
character *1 axis

C:
vp_tickmarks(number, axis)
int     number;
char    axis;

```
vp_drawaxis(axis)
Draw the axis given by axis.
```
Fortran:
subroutine vp_drawaxis(axis)
character *1 axis

C:
vp_drawaxis(axis)
char    *axis;

```
vp_drawaxes()
Draw the x, y, and z axes.
```
Fortran:
subroutine vp_drawaxes()

C:
vp_drawaxes()

```
vp_drawaxes2()
Draw the x and y axes.
```
Fortran:
subroutine vp_drawaxes2()

C:
vp_drawaxes2()

```
vp_annotation(format, axis)
Specify the format for the labels at the tickmarks on the axis. If no annotation is specified the default is used. An empty string turns it off.
```
Fortran:
subroutine vp_annotation(format, axis)
character*(*) format
character *1 axis

C:
vp_annotation(format, axis)
char    *format, axis

```
vp_graphprecision(number)
Specify the number of line segments making up a curve in the graph.
```
Fortran:
subroutine vp_graphprecision(number)
integer number

C:
vp_graphprecision(number)
int     number;

```
vp_marker(string)
Specify the current marker string which will be drawn centered over data points.
```
Fortran:
subroutine vp_marker(string)
character*(*) string

C:
vp_marker(string)
char    *string;

```
vp_markerspacing(num)
Specify the marker spacing. Default 1.
```
Fortran:
subroutine vp_markerspacing(num)
integer num

C:
vp_markerspacing(num)
int     num;

```
vp_markerscale(scale)
Specify a scaling factor for the size of markers. Default 1.0.
```
Fortran:
subroutine vp_markscale(x, y)
real x, y

C:
vp_markscale(x, y)
float   x, y;

```

VOGLE(3), GPP(3)

## BUGS

The manual page isn't finished. There isn't really any Z-axis stuff yet. The Whole thing isn't finished and could stand a total recode.

NAME
DESCRIPTION