What is in the API?

The formal definition of the PLplot C API is everything that is defined in the include file plplot.h. This includes all the function prototypes, the defined structures and the semantics of the constants. The list of symbols currently exported by the shared library libplplot.h that are declared in plplot.h is the following:

plAlloc2dGrid           plgcol0a                plscmap1l
plClearOpts             plgcolbg                plscmap1la
plFindCommand           plgcolbga               plscmap1n
plFindName              plgcompression          plscol0
plFree2dGrid            plgdev                  plscol0a
plGetCursor             plgdidev                plscolbg
plGetFlt                plgdiori                plscolbga
plGetInt                plgdiplt                plscolor
plGetName               plgdrawmode             plscompression
plMergeOpts             plgesc                  plsdev
plMinMax2dGrid          plgfam                  plsdevdata
plOptUsage              plgfci                  plsdidev
plResetOpts             plgfile                 plsdimap
plSetUsage              plgfnam                 plsdiori
plStatic2dGrid          plgfont                 plsdiplt
plTranslateCursor       plglevel                plsdiplz
pl_cmd                  plgpage                 plsdrawmode
pl_setcontlabelformat   plgra                   plseed
pl_setcontlabelparam    plgradient              plseopH
pladv                   plgriddata              plsesc
plarc                   plgspa                  plsetopt
plaxes                  plgstrm                 plsexit
plbin                   plgver                  plsfam
plbop                   plgvpd                  plsfci
plbox                   plgvpw                  plsfile
plbox3                  plgxax                  plsfnam
plbtime                 plgyax                  plsfont
plcalc_world            plgzax                  plshade
plclear                 plhist                  plshades
plcol0                  plhlsrgb                plslabelfunc
plcol1                  plimage                 plsmaj
plcolorbar              plimagefr               plsmem
plconfigtime            plinit                  plsmema
plcont                  pljoin                  plsmin
plcpstrm                pllab                   plsori
plctime                 pllegend                plspage
pldid2pc                pllightsource           plspal0
pldip2dc                plline                  plspal1
plend                   plline3                 plspause
plend1                  pllsty                  plsstrm
plenv                   plmap                   plssub
plenv0                  plmapfill               plssym
pleop                   plmapline               plstar
plerrx                  plmapstring             plstart
plerry                  plmaptex                plstr
plf2eval                plmeridians             plstransform
plf2eval1               plmesh                  plstring
plf2eval2               plmeshc                 plstring3
plf2evalr               plmkstrm                plstripa
plf2ops_c               plmtex                  plstripc
plf2ops_grid_c          plmtex3                 plstripd
plf2ops_grid_col_major  plot3d                  plstyl
plf2ops_grid_row_major  plot3dc                 plsurf3d
plfamadv                plot3dcl                plsurf3dl
plfcont                 plparseopts             plsvect
plfgriddata             plpat                   plsvpa
plfill                  plpath                  plsxax
plfill3                 plpoin                  plsxwin
plfimage                plpoin3                 plsyax
plfimagefr              plpoly3                 plsym
plflush                 plprec                  plszax
plfmesh                 plpsty                  pltext
plfmeshc                plptex                  pltimefmt
plfont                  plptex3                 pltr0
plfontld                plrandd                 pltr1
plfplot3d               plreplot                pltr2
plfplot3dc              plrgbhls                pltr2f
plfplot3dcl             plsButtonEH             pltr2p
plfshade                plsError                plvasp
plfshade1               plsKeyEH                plvect
plfshades               plsabort                plvpas
plfsurf3d               plsbopH                 plvpor
plfsurf3dl              plschr                  plvsta
plfvect                 plscmap0                plw3d
plgDevs                 plscmap0a               plwidth
plgFileDevs             plscmap0n               plwind
plgchr                  plscmap1                plxormod
plgcmap1_range          plscmap1_range          
plgcol0                 plscmap1a               

Another important aspect of compatibility regard the Application Binary Interface (ABI). Backwards compatibility can be broken by changes in the C structures made public through plplot.h. Currently, they are:

typedef struct
{
    PLCHAR_VECTOR opt;
    int ( *handler )( PLCHAR_VECTOR, PLCHAR_VECTOR, PLPointer );
    PLPointer     client_data;
    PLPointer     var;
    long          mode;
    PLCHAR_VECTOR syntax;
    PLCHAR_VECTOR desc;
} PLOptionTable;

typedef struct
{
    int          type;              // of event (CURRENTLY UNUSED)
    unsigned int state;             // key or button mask
    unsigned int keysym;            // key selected
    unsigned int button;            // mouse button selected
    PLINT        subwindow;         // subwindow (alias subpage, alias subplot) number
    char         string[PL_MAXKEY]; // translated string
    int          pX, pY;            // absolute device coordinates of pointer
    PLFLT        dX, dY;            // relative device coordinates of pointer
    PLFLT        wX, wY;            // world coordinates of pointer
} PLGraphicsIn;

typedef struct
{
    PLFLT dxmi, dxma, dymi, dyma;       // min, max window rel dev coords
    PLFLT wxmi, wxma, wymi, wyma;       // min, max window world coords
} PLWindow;

typedef struct
{
    unsigned int x, y;                  // upper left hand corner
    unsigned int width, height;         // window dimensions
} PLDisplay;

typedef struct
{
    PLFLT_FE_POINTER f;
    PLINT            nx, ny, nz;
} PLfGrid;

typedef struct
{
    PLFLT_NC_MATRIX f;
    PLINT           nx, ny;
} PLfGrid2;

typedef struct
{
    PLFLT_NC_FE_POINTER xg, yg, zg;
    PLINT nx, ny, nz;
} PLcGrid;

typedef struct
{
    PLFLT_NC_MATRIX xg, yg, zg;
    PLINT           nx, ny;
} PLcGrid2;

typedef struct
{
    unsigned char r;            // red
    unsigned char g;            // green
    unsigned char b;            // blue
    PLFLT         a;            // alpha (or transparency)
    PLCHAR_VECTOR name;
} PLColor;

typedef struct
{
    PLFLT c1;                   // hue or red
    PLFLT c2;                   // lightness or green
    PLFLT c3;                   // saturation or blue
    PLFLT p;                    // position
    PLFLT a;                    // alpha (or transparency)
    int   alt_hue_path;         // if set, interpolate through h=0
} PLControlPt;

typedef struct
{
    PLINT cmd;
    PLINT result;
} PLBufferingCB;

typedef struct
{
    PLFLT exp_label_disp;
    PLFLT exp_label_pos;
    PLFLT exp_label_just;
} PLLabelDefaults;

typedef struct
{
    PLFLT ( *get )( PLPointer p, PLINT ix, PLINT iy );
    PLFLT ( *set )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
    PLFLT ( *add )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
    PLFLT ( *sub )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
    PLFLT ( *mul )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
    PLFLT ( *div )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
    PLINT ( *is_nan )( PLPointer p, PLINT ix, PLINT iy );
    void ( *minmax )( PLPointer p, PLINT nx, PLINT ny, PLFLT_NC_SCALAR zmin, PLFLT_NC_SCALAR zmax );
    //
    // f2eval is backwards compatible signature for "f2eval" functions that
    // existed before plf2ops "operator function families" were used.
    //
    PLFLT ( *f2eval )( PLINT ix, PLINT iy, PLPointer p );
} plf2ops_t;

typedef struct
{
    size_t    size;
    PLPointer buffer;
} plbuffer;