Chapter 18. The Common API for PLplot
Prev | Part IV. Reference | Next

## Chapter 18. The Common API for PLplot

The purpose of this chapter is to document the API for every PLplot function that should be available across all PLplot language bindings. This common API between the various languages constitutes the most important part of the PLplot API that programmers need to know. Note that in C, these common API routines have a special “c_” prefix name assigned to them in `plplot.h`.

What follows is a list of all common API functions of the latest PLplot version with their arguments except for obsolete/deprecated API functions which are listed in Chapter 22, Obsolete/Deprecated API for PLplot. The following information is provided for each function:

1. The function name and a brief description.

2. The function as it would be called from C.

3. A complete description of the function.

4. A description of each argument that the function takes.

5. The redacted argument form of the function, currently used by the programming languages Fortran95, Python, Java and Perl, as well as any language specific variations that might occur on the general calling scheme described in the following paragraph.

6. A list of PLplot examples that demonstrate how to use the function.

Additional PLplot API specialized for each language binding is documented in Chapter 19, The Specialized C API for PLplot and subsequent chapters.

The general calling scheme for the other languages supported by PLplot is as follows, using the function `plline` as an example.

- C: `plline(n,x,y)`

- F95: `plline(x,y)`

- C++: `pls->line(n,x,y)`

- Java: `pls.line(x,y)`

- Perl/PDL: `plline($x,$y)`

- Python: `plline(x,y)`

- Tcl/Tk: `$w cmd plline $n x y`

Note that in some languages the argument n (which specifies the length of the arrays x and y) is not necessary, this is what we refer to above as the “redacted argument form” of the function.

#### `pl_setcontlabelformat`: Set format of numerical label for contours

`pl_setcontlabelformat (` | lexp,
| sigdig`)`;

Set format of numerical label for contours.

`lexp` (`PLINT`, input)

  If the contour numerical label is greater than 10^(lexp) or less than 10^(-lexp), then the exponential format is used. Default value of lexp is 4.

`sigdig` (`PLINT`, input)

  Number of significant digits. Default value is 2.

Redacted form: `pl_setcontlabelformat(lexp, sigdig)`

This function is used example 9.

Prev | Up | Next
Chapter 17. Bibliography | Home | `pl_setcontlabelparam`: Set parameters of contour labelling other than format of numerical label