Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Functions
plplot.h File Reference
#include "scheme.h"
#include "plConfig.h"
#include <stdio.h>
#include <stdlib.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PLOptionTable
struct  PLGraphicsIn
struct  PLWindow
struct  PLDisplay
struct  PLfGrid
struct  PLfGrid2
struct  PLcGrid
struct  PLcGrid2
struct  PLColor
struct  PLControlPt
struct  PLBufferingCB

Defines

#define PLARGS(a)   a
#define PLFLT_MAX   DBL_MAX
#define PLFLT_MIN   DBL_MIN
#define PLESC_SET_RGB   1 /* obsolete */
#define PLESC_ALLOC_NCOL   2 /* obsolete */
#define PLESC_SET_LPB   3 /* obsolete */
#define PLESC_EXPOSE   4 /* handle window expose */
#define PLESC_RESIZE   5 /* handle window resize */
#define PLESC_REDRAW   6 /* handle window redraw */
#define PLESC_TEXT   7 /* switch to text screen */
#define PLESC_GRAPH   8 /* switch to graphics screen */
#define PLESC_FILL   9 /* fill polygon */
#define PLESC_DI   10 /* handle DI command */
#define PLESC_FLUSH   11 /* flush output */
#define PLESC_EH   12 /* handle Window events */
#define PLESC_GETC   13 /* get cursor position */
#define PLESC_SWIN   14 /* set window parameters */
#define PLESC_DOUBLEBUFFERING   15 /* configure double buffering */
#define PLESC_XORMOD   16 /* set xor mode */
#define PLESC_SET_COMPRESSION   17 /* AFR: set compression */
#define PLESC_CLEAR   18 /* RL: clear graphics region */
#define PLESC_DASH   19 /* RL: draw dashed line */
#define PLESC_HAS_TEXT   20 /* driver draws text */
#define PLESC_IMAGE   21 /* handle image */
#define PLESC_IMAGEOPS   22 /* plimage related operations */
#define PLESC_PL2DEVCOL   23 /* convert PLColor to device color */
#define PLESC_DEV2PLCOL   24 /* convert device color to PLColor */
#define PLESC_SETBGFG   25 /* set BG, FG colors */
#define PLESC_DEVINIT   26 /* alternate device initialization */
#define ZEROW2B   1
#define ZEROW2D   2
#define ONEW2B   3
#define ONEW2D   4
#define PLSWIN_DEVICE   1 /* device coordinates */
#define PLSWIN_WORLD   2 /* world coordinates */
#define PL_OPT_ENABLED   0x0001 /* Obsolete */
#define PL_OPT_ARG   0x0002 /* Option has an argment */
#define PL_OPT_NODELETE   0x0004 /* Don't delete after processing */
#define PL_OPT_INVISIBLE   0x0008 /* Make invisible */
#define PL_OPT_DISABLED   0x0010 /* Processing is disabled */
#define PL_OPT_FUNC   0x0100 /* Call handler function */
#define PL_OPT_BOOL   0x0200 /* Set *var = 1 */
#define PL_OPT_INT   0x0400 /* Set *var = atoi(optarg) */
#define PL_OPT_FLOAT   0x0800 /* Set *var = atof(optarg) */
#define PL_OPT_STRING   0x1000 /* Set var = optarg */
#define PL_PARSE_PARTIAL   0x0000 /* For backward compatibility */
#define PL_PARSE_FULL   0x0001 /* Process fully & exit if error */
#define PL_PARSE_QUIET   0x0002 /* Don't issue messages */
#define PL_PARSE_NODELETE   0x0004 /* Don't delete options after */
#define PL_PARSE_SHOWALL   0x0008 /* Show invisible options */
#define PL_PARSE_OVERRIDE   0x0010 /* Obsolete */
#define PL_PARSE_NOPROGRAM   0x0020 /* Program name NOT in *argv[0].. */
#define PL_PARSE_NODASH   0x0040 /* Set if leading dash NOT required */
#define PL_PARSE_SKIP   0x0080 /* Skip over unrecognized args */
#define plParseInternalOpts(a, b, c)   plParseOpts(a, b, c)
#define plSetInternalOpt(a, b)   plSetOpt(a, b)
#define PL_MAXKEY   16
#define PL_MAXWINDOWS   64 /* Max number of windows/page tracked */
#define PL_NOTSET   (-42)
#define PLESC_DOUBLEBUFFERING_ENABLE   1
#define PLESC_DOUBLEBUFFERING_DISABLE   2
#define PLESC_DOUBLEBUFFERING_QUERY   3
#define BRAINDEAD
#define pl_setcontlabelformat   c_pl_setcontlabelformat
#define pl_setcontlabelparam   c_pl_setcontlabelparam
#define pladv   c_pladv
#define plaxes   c_plaxes
#define plbin   c_plbin
#define plbop   c_plbop
#define plbox   c_plbox
#define plbox3   c_plbox3
#define plcalc_world   c_plcalc_world
#define plclear   c_plclear
#define plcol0   c_plcol0
#define plcol1   c_plcol1
#define plcont   c_plcont
#define plcpstrm   c_plcpstrm
#define plend   c_plend
#define plend1   c_plend1
#define plenv   c_plenv
#define plenv0   c_plenv0
#define pleop   c_pleop
#define plerrx   c_plerrx
#define plerry   c_plerry
#define plfamadv   c_plfamadv
#define plfill   c_plfill
#define plfill3   c_plfill3
#define plflush   c_plflush
#define plfont   c_plfont
#define plfontld   c_plfontld
#define plgchr   c_plgchr
#define plgcol0   c_plgcol0
#define plgcolbg   c_plgcolbg
#define plgcompression   c_plgcompression
#define plgdev   c_plgdev
#define plgdidev   c_plgdidev
#define plgdiori   c_plgdiori
#define plgdiplt   c_plgdiplt
#define plgfam   c_plgfam
#define plgfnam   c_plgfnam
#define plglevel   c_plglevel
#define plgpage   c_plgpage
#define plgra   c_plgra
#define plgriddata   c_plgriddata
#define plgspa   c_plgspa
#define plgstrm   c_plgstrm
#define plgver   c_plgver
#define plgvpd   c_plgvpd
#define plgvpw   c_plgvpw
#define plgxax   c_plgxax
#define plgyax   c_plgyax
#define plgzax   c_plgzax
#define plhist   c_plhist
#define plhls   c_plhls
#define plinit   c_plinit
#define pljoin   c_pljoin
#define pllab   c_pllab
#define pllightsource   c_pllightsource
#define plline   c_plline
#define plline3   c_plline3
#define pllsty   c_pllsty
#define plmesh   c_plmesh
#define plmeshc   c_plmeshc
#define plmkstrm   c_plmkstrm
#define plmtex   c_plmtex
#define plot3d   c_plot3d
#define plot3dc   c_plot3dc
#define plsurf3d   c_plsurf3d
#define plpat   c_plpat
#define plpoin   c_plpoin
#define plpoin3   c_plpoin3
#define plpoly3   c_plpoly3
#define plprec   c_plprec
#define plpsty   c_plpsty
#define plptex   c_plptex
#define plreplot   c_plreplot
#define plrgb   c_plrgb
#define plrgb1   c_plrgb1
#define plschr   c_plschr
#define plscmap0   c_plscmap0
#define plscmap1   c_plscmap1
#define plscmap0n   c_plscmap0n
#define plscmap1n   c_plscmap1n
#define plscmap1l   c_plscmap1l
#define plscol0   c_plscol0
#define plscolbg   c_plscolbg
#define plscolor   c_plscolor
#define plscompression   c_plscompression
#define plsdev   c_plsdev
#define plsdiplt   c_plsdiplt
#define plsdiplz   c_plsdiplz
#define plsdidev   c_plsdidev
#define plsdimap   c_plsdimap
#define plsdiori   c_plsdiori
#define plsetopt   c_plsetopt
#define plsesc   c_plsesc
#define plsfam   c_plsfam
#define plsfnam   c_plsfnam
#define plshades   c_plshades
#define plshade   c_plshade
#define plshade1   c_plshade1
#define plsmaj   c_plsmaj
#define plsmem   c_plsmem
#define plsmin   c_plsmin
#define plsori   c_plsori
#define plspage   c_plspage
#define plspause   c_plspause
#define plsstrm   c_plsstrm
#define plssub   c_plssub
#define plssym   c_plssym
#define plstar   c_plstar
#define plstart   c_plstart
#define plstripa   c_plstripa
#define plstripc   c_plstripc
#define plstripd   c_plstripd
#define plstyl   c_plstyl
#define plsvpa   c_plsvpa
#define plsxax   c_plsxax
#define plsyax   c_plsyax
#define plsym   c_plsym
#define plszax   c_plszax
#define pltext   c_pltext
#define plvasp   c_plvasp
#define plvpas   c_plvpas
#define plvpor   c_plvpor
#define plvsta   c_plvsta
#define plw3d   c_plw3d
#define plwid   c_plwid
#define plwind   c_plwind
#define plxormod   c_plxormod
#define plclr   pleop
#define plpage   plbop
#define plcol   plcol0
#define plcontf   plfcont
#define Alloc2dGrid   plAlloc2dGrid
#define Free2dGrid   plFree2dGrid
#define MinMax2dGrid   plMinMax2dGrid
#define plP_gvpd   plgvpd
#define plP_gvpw   plgvpw
#define plotsh3d(x, y, z, nx, ny, opt)   plsurf3d(x,y,z,nx,ny,opt, NULL, 0)
#define GRID_CSA   1 /* Bivariate Cubic Spline approximation */
#define GRID_DTLI   2 /* Delaunay Triangulation Linear Interpolation */
#define GRID_NNI   3 /* Natural Neighbors Interpolation */
#define GRID_NNIDW   4 /* Nearest Neighbors Inverse Distance Weighted */
#define GRID_NNLI   5 /* Nearest Neighbors Linear Interpolation */
#define GRID_NNAIDW   6 /* Nearest Neighbors Around Inverse Distance Weighted */
#define DRAW_LINEX   (1 << 0) /* draw lines parallel to the X axis */
#define DRAW_LINEY   (1 << 1) /* draw lines parallel to the Y axis */
#define DRAW_LINEXY   (DRAW_LINEX | DRAW_LINEY) /* draw lines parallel to both the X and Y axis */
#define MAG_COLOR   (1 << 2) /* draw the mesh with a color dependent of the magnitude */
#define BASE_CONT   (1 << 3) /* draw contour plot at bottom xy plane */
#define TOP_CONT   (1 << 4) /* draw contour plot at top xy plane */
#define SURF_CONT   (1 << 5) /* draw contour plot at surface */
#define DRAW_SIDES   (1 << 6) /* draw sides */
#define FACETED   (1 << 7) /* draw outline for each square that makes up the surface */
#define MESH   (1 << 8) /* draw mesh */

Typedefs

typedef double PLFLT
typedef int PLINT
typedef voidPLPointer

Functions

void c_pl_setcontlabelformat (PLINT lexp, PLINT sigdig)
void c_pl_setcontlabelparam (PLFLT offset, PLFLT size, PLFLT spacing, PLINT active)
void c_pladv (PLINT page)
void plarrows (PLFLT *u, PLFLT *v, PLFLT *x, PLFLT *y, PLINT n, PLFLT scale, PLFLT dx, PLFLT dy)
void c_plaxes (PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub)
void c_plbin (PLINT nbin, PLFLT *x, PLFLT *y, PLINT center)
void c_plbop (void)
void c_plbox (const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub)
MZ_DLLEXPORT void c_plbox3 (const char *xopt, const char *xlabel, PLFLT xtick, PLINT nsubx, const char *yopt, const char *ylabel, PLFLT ytick, PLINT nsuby, const char *zopt, const char *zlabel, PLFLT ztick, PLINT nsubz)
void c_plcalc_world (PLFLT rx, PLFLT ry, PLFLT *wx, PLFLT *wy, PLINT *window)
void c_plclear (void)
MZ_DLLEXPORT void c_plcol0 (PLINT icol0)
void c_plcol1 (PLFLT col1)
MZ_DLLEXPORT void c_plcont (PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void plfcont (PLFLT(*f2eval)(PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void c_plcpstrm (PLINT iplsr, PLINT flags)
void pldid2pc (PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax)
void pldip2dc (PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax)
MZ_DLLEXPORT void c_plend (void)
void c_plend1 (void)
MZ_DLLEXPORT void c_plenv (PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis)
void c_plenv0 (PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis)
void c_pleop (void)
MZ_DLLEXPORT void c_plerrx (PLINT n, PLFLT *xmin, PLFLT *xmax, PLFLT *y)
MZ_DLLEXPORT void c_plerry (PLINT n, PLFLT *x, PLFLT *ymin, PLFLT *ymax)
void c_plfamadv (void)
MZ_DLLEXPORT void c_plfill (PLINT n, PLFLT *x, PLFLT *y)
void c_plfill3 (PLINT n, PLFLT *x, PLFLT *y, PLFLT *z)
void c_plflush (void)
void c_plfont (PLINT ifont)
void c_plfontld (PLINT fnt)
void c_plgchr (PLFLT *p_def, PLFLT *p_ht)
void c_plgcol0 (PLINT icol0, PLINT *r, PLINT *g, PLINT *b)
void c_plgcolbg (PLINT *r, PLINT *g, PLINT *b)
void c_plgcompression (PLINT *compression)
void c_plgdev (char *p_dev)
void c_plgdidev (PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy)
void c_plgdiori (PLFLT *p_rot)
void c_plgdiplt (PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax)
void c_plgfam (PLINT *p_fam, PLINT *p_num, PLINT *p_bmax)
void c_plgfnam (char *fnam)
void c_plglevel (PLINT *p_level)
void c_plgpage (PLFLT *p_xp, PLFLT *p_yp, PLINT *p_xleng, PLINT *p_yleng, PLINT *p_xoff, PLINT *p_yoff)
void c_plgra (void)
void c_plgriddata (PLFLT *x, PLFLT *y, PLFLT *z, int npts, PLFLT *xg, int nptsx, PLFLT *yg, int nptsy, PLFLT **zg, int type, PLFLT data)
void c_plgspa (PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax)
void c_plgstrm (PLINT *p_strm)
void c_plgver (char *p_ver)
void c_plgvpd (PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
void c_plgvpw (PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
void c_plgxax (PLINT *p_digmax, PLINT *p_digits)
void c_plgyax (PLINT *p_digmax, PLINT *p_digits)
void c_plgzax (PLINT *p_digmax, PLINT *p_digits)
void c_plhist (PLINT n, PLFLT *data, PLFLT datmin, PLFLT datmax, PLINT nbin, PLINT oldwin)
void c_plhls (PLFLT h, PLFLT l, PLFLT s)
MZ_DLLEXPORT void c_plinit (void)
MZ_DLLEXPORT void c_pljoin (PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2)
MZ_DLLEXPORT void c_pllab (const char *xlabel, const char *ylabel, const char *tlabel)
void c_pllightsource (PLFLT x, PLFLT y, PLFLT z)
MZ_DLLEXPORT void c_plline (PLINT n, PLFLT *x, PLFLT *y)
MZ_DLLEXPORT void c_plline3 (PLINT n, PLFLT *x, PLFLT *y, PLFLT *z)
void c_pllsty (PLINT lin)
void plmap (void(*mapform)(PLINT, PLFLT *, PLFLT *), char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
void plmeridians (void(*mapform)(PLINT, PLFLT *, PLFLT *), PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
void c_plmesh (PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt)
MZ_DLLEXPORT void c_plmeshc (PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel)
void c_plmkstrm (PLINT *p_strm)
void c_plmtex (const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text)
MZ_DLLEXPORT void c_plot3d (PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLINT side)
void c_plot3dc (PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel)
void c_plsurf3d (PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel)
void c_plpat (PLINT nlin, PLINT *inc, PLINT *del)
MZ_DLLEXPORT void c_plpoin (PLINT n, PLFLT *x, PLFLT *y, PLINT code)
void c_plpoin3 (PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT code)
MZ_DLLEXPORT void c_plpoly3 (PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *draw, PLINT ifcc)
void c_plprec (PLINT setp, PLINT prec)
void c_plpsty (PLINT patt)
MZ_DLLEXPORT void c_plptex (PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, const char *text)
void c_plreplot (void)
void c_plrgb (PLFLT r, PLFLT g, PLFLT b)
void c_plrgb1 (PLINT r, PLINT g, PLINT b)
void c_plschr (PLFLT def, PLFLT scale)
void c_plscmap0n (PLINT ncol0)
MZ_DLLEXPORT void c_plscmap1n (PLINT ncol1)
void c_plscmap0 (PLINT *r, PLINT *g, PLINT *b, PLINT ncol0)
void c_plscmap1 (PLINT *r, PLINT *g, PLINT *b, PLINT ncol1)
MZ_DLLEXPORT void c_plscmap1l (PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev)
MZ_DLLEXPORT void c_plscol0 (PLINT icol0, PLINT r, PLINT g, PLINT b)
MZ_DLLEXPORT void c_plscolbg (PLINT r, PLINT g, PLINT b)
void c_plscolor (PLINT color)
void c_plscompression (PLINT compression)
MZ_DLLEXPORT void c_plsdev (const char *devname)
void c_plsdidev (PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy)
void c_plsdimap (PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, PLFLT dimxpmm, PLFLT dimypmm)
void c_plsdiori (PLFLT rot)
void c_plsdiplt (PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax)
void c_plsdiplz (PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax)
void c_plsesc (char esc)
void c_plsfam (PLINT fam, PLINT num, PLINT bmax)
MZ_DLLEXPORT void c_plsfnam (const char *fnam)
MZ_DLLEXPORT void c_plshades (PLFLT **a, PLINT nx, PLINT ny, PLINT(*defined)(PLFLT, PLFLT), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT *clevel, PLINT nlevel, PLINT fill_width, PLINT cont_color, PLINT cont_width, void(*fill)(PLINT, PLFLT *, PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void c_plshade (PLFLT **a, PLINT nx, PLINT ny, PLINT(*defined)(PLFLT, PLFLT), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void(*fill)(PLINT, PLFLT *, PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void plshade1 (PLFLT *a, PLINT nx, PLINT ny, PLINT(*defined)(PLFLT, PLFLT), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void(*fill)(PLINT, PLFLT *, PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void plfshade (PLFLT(*f2eval)(PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLFLT(*c2eval)(PLINT, PLINT, PLPointer), PLPointer c2eval_data, PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void(*fill)(PLINT, PLFLT *, PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void c_plsmaj (PLFLT def, PLFLT scale)
void c_plsmem (PLINT maxx, PLINT maxy, void *plotmem)
void c_plsmin (PLFLT def, PLFLT scale)
void c_plsori (PLINT ori)
MZ_DLLEXPORT void c_plspage (PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, PLINT xoff, PLINT yoff)
void c_plspause (PLINT pause)
void c_plsstrm (PLINT strm)
void c_plssub (PLINT nx, PLINT ny)
void c_plssym (PLFLT def, PLFLT scale)
void c_plstar (PLINT nx, PLINT ny)
void c_plstart (const char *devname, PLINT nx, PLINT ny)
void c_plstripc (PLINT *id, char *xspec, char *yspec, PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, PLFLT xlpos, PLFLT ylpos, PLINT y_ascl, PLINT acc, PLINT colbox, PLINT collab, PLINT colline[], PLINT styline[], char *legline[], char *labx, char *laby, char *labtop)
void c_plstripa (PLINT id, PLINT pen, PLFLT x, PLFLT y)
void c_plstripd (PLINT id)
void plimage (PLFLT **data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax)
void c_plstyl (PLINT nms, PLINT *mark, PLINT *space)
void c_plsvpa (PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax)
void c_plsxax (PLINT digmax, PLINT digits)
void plsxwin (PLINT window_id)
void c_plsyax (PLINT digmax, PLINT digits)
void c_plsym (PLINT n, PLFLT *x, PLFLT *y, PLINT code)
void c_plszax (PLINT digmax, PLINT digits)
void c_pltext (void)
void c_plvasp (PLFLT aspect)
void c_plvpas (PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect)
void c_plvpor (PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax)
void c_plvsta (void)
MZ_DLLEXPORT void c_plw3d (PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin0, PLFLT xmax0, PLFLT ymin0, PLFLT ymax0, PLFLT zmin0, PLFLT zmax0, PLFLT alt, PLFLT az)
MZ_DLLEXPORT void c_plwid (PLINT width)
void c_plwind (PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax)
void c_plxormod (PLINT mode, PLINT *status)
void plgFileDevs (char ***p_menustr, char ***p_devname, int *p_ndev)
void plgDevs (char ***p_menustr, char ***p_devname, int *p_ndev)
void plsKeyEH (void(*KeyEH)(PLGraphicsIn *, void *, int *), void *KeyEH_data)
void plsButtonEH (void(*ButtonEH)(PLGraphicsIn *, void *, int *), void *ButtonEH_data)
void plsbopH (void(*handler)(void *, int *), void *handler_data)
void plseopH (void(*handler)(void *, int *), void *handler_data)
void plsError (PLINT *errcode, char *errmsg)
void plsexit (int(*handler)(char *))
void pltr0 (PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
MZ_DLLEXPORT void pltr1 (PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
void pltr2 (PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
void pltr2p (PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
void pltr0f (PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
void pltr2f (PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
void xform (PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty)
PLFLT plf2eval2 (PLINT ix, PLINT iy, PLPointer plf2eval_data)
PLFLT plf2eval (PLINT ix, PLINT iy, PLPointer plf2eval_data)
PLFLT plf2evalr (PLINT ix, PLINT iy, PLPointer plf2eval_data)
void plClearOpts (void)
void plResetOpts (void)
int plMergeOpts (PLOptionTable *options, char *name, char **notes)
void plSetUsage (char *program_string, char *usage_string)
int c_plsetopt (char *opt, char *optarg)
int plSetOpt (char *opt, char *optarg)
int plParseOpts (int *p_argc, char **argv, PLINT mode)
void plOptUsage (void)
void plgfile (FILE **p_file)
void plsfile (FILE *file)
void plgesc (char *p_esc)
void pl_cmd (PLINT op, void *ptr)
int plFindName (char *p)
char * plFindCommand (char *fn)
void plGetName (char *dir, char *subdir, char *filename, char **filespec)
PLINT plGetInt (char *s)
PLFLT plGetFlt (char *s)
void plAlloc2dGrid (PLFLT ***f, PLINT nx, PLINT ny)
void plFree2dGrid (PLFLT **f, PLINT nx, PLINT ny)
void plMinMax2dGrid (PLFLT **f, PLINT nx, PLINT ny, PLFLT *fmax, PLFLT *fmin)
void plHLS_RGB (PLFLT h, PLFLT l, PLFLT s, PLFLT *p_r, PLFLT *p_g, PLFLT *p_b)
void plRGB_HLS (PLFLT r, PLFLT g, PLFLT b, PLFLT *p_h, PLFLT *p_l, PLFLT *p_s)
int plGetCursor (PLGraphicsIn *gin)
int plTranslateCursor (PLGraphicsIn *gin)

Class Documentation

struct PLGraphicsIn

Definition at line 242 of file plplot.h.

Class Members
unsigned int button
PLFLT dX
PLFLT dY
unsigned int keysym
int pX
int pY
unsigned int state
char string
PLINT subwindow
int type
PLFLT wX
PLFLT wY
struct PLWindow

Definition at line 258 of file plplot.h.

Class Members
PLFLT dxma
PLFLT dxmi
PLFLT dyma
PLFLT dymi
PLFLT wxma
PLFLT wxmi
PLFLT wyma
PLFLT wymi
struct PLDisplay

Definition at line 266 of file plplot.h.

Class Members
unsigned int height
unsigned int width
unsigned int x
unsigned int y
struct PLfGrid

Definition at line 284 of file plplot.h.

Class Members
PLFLT * f
PLINT nx
PLINT ny
PLINT nz
struct PLfGrid2

Definition at line 294 of file plplot.h.

Class Members
PLFLT ** f
PLINT nx
PLINT ny
struct PLcGrid

Definition at line 310 of file plplot.h.

Class Members
PLINT nx
PLINT ny
PLINT nz
PLFLT * xg
PLFLT * yg
PLFLT * zg
struct PLcGrid2

Definition at line 321 of file plplot.h.

Class Members
PLINT nx
PLINT ny
PLFLT ** xg
PLFLT ** yg
PLFLT ** zg
struct PLColor

Definition at line 333 of file plplot.h.

Class Members
unsigned char b
unsigned char g
char * name
unsigned char r
struct PLControlPt

Definition at line 342 of file plplot.h.

Class Members
PLFLT h
PLFLT l
PLFLT p
int rev
PLFLT s
struct PLBufferingCB

Definition at line 353 of file plplot.h.

Class Members
PLINT cmd
PLINT result

Define Documentation

#define Alloc2dGrid   plAlloc2dGrid

Definition at line 693 of file plplot.h.

#define BASE_CONT   (1 << 3) /* draw contour plot at bottom xy plane */

Definition at line 1135 of file plplot.h.

#define BRAINDEAD

Definition at line 413 of file plplot.h.

#define DRAW_LINEX   (1 << 0) /* draw lines parallel to the X axis */

Definition at line 1131 of file plplot.h.

#define DRAW_LINEXY   (DRAW_LINEX | DRAW_LINEY) /* draw lines parallel to both the X and Y axis */

Definition at line 1133 of file plplot.h.

#define DRAW_LINEY   (1 << 1) /* draw lines parallel to the Y axis */

Definition at line 1132 of file plplot.h.

#define DRAW_SIDES   (1 << 6) /* draw sides */

Definition at line 1138 of file plplot.h.

#define FACETED   (1 << 7) /* draw outline for each square that makes up the surface */

Definition at line 1139 of file plplot.h.

#define Free2dGrid   plFree2dGrid

Definition at line 694 of file plplot.h.

#define GRID_CSA   1 /* Bivariate Cubic Spline approximation */

Definition at line 978 of file plplot.h.

#define GRID_DTLI   2 /* Delaunay Triangulation Linear Interpolation */

Definition at line 979 of file plplot.h.

#define GRID_NNAIDW   6 /* Nearest Neighbors Around Inverse Distance Weighted */

Definition at line 983 of file plplot.h.

#define GRID_NNI   3 /* Natural Neighbors Interpolation */

Definition at line 980 of file plplot.h.

#define GRID_NNIDW   4 /* Nearest Neighbors Inverse Distance Weighted */

Definition at line 981 of file plplot.h.

#define GRID_NNLI   5 /* Nearest Neighbors Linear Interpolation */

Definition at line 982 of file plplot.h.

#define MAG_COLOR   (1 << 2) /* draw the mesh with a color dependent of the magnitude */

Definition at line 1134 of file plplot.h.

#define MESH   (1 << 8) /* draw mesh */

Definition at line 1140 of file plplot.h.

Definition at line 695 of file plplot.h.

#define ONEW2B   3

Definition at line 181 of file plplot.h.

#define ONEW2D   4

Definition at line 182 of file plplot.h.

#define PL_MAXKEY   16

Definition at line 240 of file plplot.h.

#define PL_MAXWINDOWS   64 /* Max number of windows/page tracked */

Definition at line 256 of file plplot.h.

#define PL_NOTSET   (-42)

Definition at line 274 of file plplot.h.

#define PL_OPT_ARG   0x0002 /* Option has an argment */

Definition at line 194 of file plplot.h.

#define PL_OPT_BOOL   0x0200 /* Set *var = 1 */

Definition at line 202 of file plplot.h.

#define PL_OPT_DISABLED   0x0010 /* Processing is disabled */

Definition at line 197 of file plplot.h.

#define PL_OPT_ENABLED   0x0001 /* Obsolete */

Definition at line 193 of file plplot.h.

#define PL_OPT_FLOAT   0x0800 /* Set *var = atof(optarg) */

Definition at line 204 of file plplot.h.

#define PL_OPT_FUNC   0x0100 /* Call handler function */

Definition at line 201 of file plplot.h.

#define PL_OPT_INT   0x0400 /* Set *var = atoi(optarg) */

Definition at line 203 of file plplot.h.

#define PL_OPT_INVISIBLE   0x0008 /* Make invisible */

Definition at line 196 of file plplot.h.

#define PL_OPT_NODELETE   0x0004 /* Don't delete after processing */

Definition at line 195 of file plplot.h.

#define PL_OPT_STRING   0x1000 /* Set var = optarg */

Definition at line 205 of file plplot.h.

#define PL_PARSE_FULL   0x0001 /* Process fully & exit if error */

Definition at line 211 of file plplot.h.

#define PL_PARSE_NODASH   0x0040 /* Set if leading dash NOT required */

Definition at line 218 of file plplot.h.

#define PL_PARSE_NODELETE   0x0004 /* Don't delete options after */

Definition at line 213 of file plplot.h.

#define PL_PARSE_NOPROGRAM   0x0020 /* Program name NOT in *argv[0].. */

Definition at line 217 of file plplot.h.

#define PL_PARSE_OVERRIDE   0x0010 /* Obsolete */

Definition at line 216 of file plplot.h.

#define PL_PARSE_PARTIAL   0x0000 /* For backward compatibility */

Definition at line 210 of file plplot.h.

#define PL_PARSE_QUIET   0x0002 /* Don't issue messages */

Definition at line 212 of file plplot.h.

#define PL_PARSE_SHOWALL   0x0008 /* Show invisible options */

Definition at line 215 of file plplot.h.

#define PL_PARSE_SKIP   0x0080 /* Skip over unrecognized args */

Definition at line 219 of file plplot.h.

Definition at line 424 of file plplot.h.

Definition at line 425 of file plplot.h.

#define pladv   c_pladv

Definition at line 426 of file plplot.h.

#define PLARGS (   a)    a

Definition at line 103 of file plplot.h.

#define plaxes   c_plaxes

Definition at line 427 of file plplot.h.

#define plbin   c_plbin

Definition at line 428 of file plplot.h.

#define plbop   c_plbop

Definition at line 429 of file plplot.h.

#define plbox   c_plbox

Definition at line 430 of file plplot.h.

#define plbox3   c_plbox3

Definition at line 431 of file plplot.h.

Definition at line 432 of file plplot.h.

#define plclear   c_plclear

Definition at line 433 of file plplot.h.

#define plclr   pleop

Definition at line 689 of file plplot.h.

#define plcol   plcol0

Definition at line 691 of file plplot.h.

#define plcol0   c_plcol0

Definition at line 434 of file plplot.h.

#define plcol1   c_plcol1

Definition at line 435 of file plplot.h.

#define plcont   c_plcont

Definition at line 436 of file plplot.h.

#define plcontf   plfcont

Definition at line 692 of file plplot.h.

#define plcpstrm   c_plcpstrm

Definition at line 437 of file plplot.h.

#define plend   c_plend

Definition at line 438 of file plplot.h.

#define plend1   c_plend1

Definition at line 439 of file plplot.h.

#define plenv   c_plenv

Definition at line 440 of file plplot.h.

#define plenv0   c_plenv0

Definition at line 441 of file plplot.h.

#define pleop   c_pleop

Definition at line 442 of file plplot.h.

#define plerrx   c_plerrx

Definition at line 443 of file plplot.h.

#define plerry   c_plerry

Definition at line 444 of file plplot.h.

#define PLESC_ALLOC_NCOL   2 /* obsolete */

Definition at line 152 of file plplot.h.

#define PLESC_CLEAR   18 /* RL: clear graphics region */

Definition at line 168 of file plplot.h.

#define PLESC_DASH   19 /* RL: draw dashed line */

Definition at line 169 of file plplot.h.

#define PLESC_DEV2PLCOL   24 /* convert device color to PLColor */

Definition at line 174 of file plplot.h.

#define PLESC_DEVINIT   26 /* alternate device initialization */

Definition at line 176 of file plplot.h.

#define PLESC_DI   10 /* handle DI command */

Definition at line 160 of file plplot.h.

#define PLESC_DOUBLEBUFFERING   15 /* configure double buffering */

Definition at line 165 of file plplot.h.

Definition at line 359 of file plplot.h.

Definition at line 358 of file plplot.h.

Definition at line 360 of file plplot.h.

#define PLESC_EH   12 /* handle Window events */

Definition at line 162 of file plplot.h.

#define PLESC_EXPOSE   4 /* handle window expose */

Definition at line 154 of file plplot.h.

#define PLESC_FILL   9 /* fill polygon */

Definition at line 159 of file plplot.h.

#define PLESC_FLUSH   11 /* flush output */

Definition at line 161 of file plplot.h.

#define PLESC_GETC   13 /* get cursor position */

Definition at line 163 of file plplot.h.

#define PLESC_GRAPH   8 /* switch to graphics screen */

Definition at line 158 of file plplot.h.

#define PLESC_HAS_TEXT   20 /* driver draws text */

Definition at line 170 of file plplot.h.

#define PLESC_IMAGE   21 /* handle image */

Definition at line 171 of file plplot.h.

#define PLESC_IMAGEOPS   22 /* plimage related operations */

Definition at line 172 of file plplot.h.

#define PLESC_PL2DEVCOL   23 /* convert PLColor to device color */

Definition at line 173 of file plplot.h.

#define PLESC_REDRAW   6 /* handle window redraw */

Definition at line 156 of file plplot.h.

#define PLESC_RESIZE   5 /* handle window resize */

Definition at line 155 of file plplot.h.

#define PLESC_SET_COMPRESSION   17 /* AFR: set compression */

Definition at line 167 of file plplot.h.

#define PLESC_SET_LPB   3 /* obsolete */

Definition at line 153 of file plplot.h.

#define PLESC_SET_RGB   1 /* obsolete */

Definition at line 151 of file plplot.h.

#define PLESC_SETBGFG   25 /* set BG, FG colors */

Definition at line 175 of file plplot.h.

#define PLESC_SWIN   14 /* set window parameters */

Definition at line 164 of file plplot.h.

#define PLESC_TEXT   7 /* switch to text screen */

Definition at line 157 of file plplot.h.

#define PLESC_XORMOD   16 /* set xor mode */

Definition at line 166 of file plplot.h.

#define plfamadv   c_plfamadv

Definition at line 445 of file plplot.h.

#define plfill   c_plfill

Definition at line 446 of file plplot.h.

#define plfill3   c_plfill3

Definition at line 447 of file plplot.h.

#define PLFLT_MAX   DBL_MAX

Definition at line 125 of file plplot.h.

#define PLFLT_MIN   DBL_MIN

Definition at line 126 of file plplot.h.

#define plflush   c_plflush

Definition at line 448 of file plplot.h.

#define plfont   c_plfont

Definition at line 449 of file plplot.h.

#define plfontld   c_plfontld

Definition at line 450 of file plplot.h.

#define plgchr   c_plgchr

Definition at line 451 of file plplot.h.

#define plgcol0   c_plgcol0

Definition at line 452 of file plplot.h.

#define plgcolbg   c_plgcolbg

Definition at line 453 of file plplot.h.

Definition at line 454 of file plplot.h.

#define plgdev   c_plgdev

Definition at line 455 of file plplot.h.

#define plgdidev   c_plgdidev

Definition at line 456 of file plplot.h.

#define plgdiori   c_plgdiori

Definition at line 457 of file plplot.h.

#define plgdiplt   c_plgdiplt

Definition at line 458 of file plplot.h.

#define plgfam   c_plgfam

Definition at line 459 of file plplot.h.

#define plgfnam   c_plgfnam

Definition at line 460 of file plplot.h.

#define plglevel   c_plglevel

Definition at line 461 of file plplot.h.

#define plgpage   c_plgpage

Definition at line 462 of file plplot.h.

#define plgra   c_plgra

Definition at line 463 of file plplot.h.

#define plgriddata   c_plgriddata

Definition at line 464 of file plplot.h.

#define plgspa   c_plgspa

Definition at line 465 of file plplot.h.

#define plgstrm   c_plgstrm

Definition at line 466 of file plplot.h.

#define plgver   c_plgver

Definition at line 467 of file plplot.h.

#define plgvpd   c_plgvpd

Definition at line 468 of file plplot.h.

#define plgvpw   c_plgvpw

Definition at line 469 of file plplot.h.

#define plgxax   c_plgxax

Definition at line 470 of file plplot.h.

#define plgyax   c_plgyax

Definition at line 471 of file plplot.h.

#define plgzax   c_plgzax

Definition at line 472 of file plplot.h.

#define plhist   c_plhist

Definition at line 473 of file plplot.h.

#define plhls   c_plhls

Definition at line 474 of file plplot.h.

#define plinit   c_plinit

Definition at line 475 of file plplot.h.

#define pljoin   c_pljoin

Definition at line 476 of file plplot.h.

#define pllab   c_pllab

Definition at line 477 of file plplot.h.

Definition at line 478 of file plplot.h.

#define plline   c_plline

Definition at line 479 of file plplot.h.

#define plline3   c_plline3

Definition at line 480 of file plplot.h.

#define pllsty   c_pllsty

Definition at line 481 of file plplot.h.

#define plmesh   c_plmesh

Definition at line 482 of file plplot.h.

#define plmeshc   c_plmeshc

Definition at line 483 of file plplot.h.

#define plmkstrm   c_plmkstrm

Definition at line 484 of file plplot.h.

#define plmtex   c_plmtex

Definition at line 485 of file plplot.h.

#define plot3d   c_plot3d

Definition at line 486 of file plplot.h.

#define plot3dc   c_plot3dc

Definition at line 487 of file plplot.h.

#define plotsh3d (   x,
  y,
  z,
  nx,
  ny,
  opt 
)    plsurf3d(x,y,z,nx,ny,opt, NULL, 0)

Definition at line 698 of file plplot.h.

#define plP_gvpd   plgvpd

Definition at line 696 of file plplot.h.

#define plP_gvpw   plgvpw

Definition at line 697 of file plplot.h.

#define plpage   plbop

Definition at line 690 of file plplot.h.

#define plParseInternalOpts (   a,
  b,
 
)    plParseOpts(a, b, c)

Definition at line 223 of file plplot.h.

#define plpat   c_plpat

Definition at line 489 of file plplot.h.

#define plpoin   c_plpoin

Definition at line 490 of file plplot.h.

#define plpoin3   c_plpoin3

Definition at line 491 of file plplot.h.

#define plpoly3   c_plpoly3

Definition at line 492 of file plplot.h.

#define plprec   c_plprec

Definition at line 493 of file plplot.h.

#define plpsty   c_plpsty

Definition at line 494 of file plplot.h.

#define plptex   c_plptex

Definition at line 495 of file plplot.h.

#define plreplot   c_plreplot

Definition at line 496 of file plplot.h.

#define plrgb   c_plrgb

Definition at line 497 of file plplot.h.

#define plrgb1   c_plrgb1

Definition at line 498 of file plplot.h.

#define plschr   c_plschr

Definition at line 499 of file plplot.h.

#define plscmap0   c_plscmap0

Definition at line 500 of file plplot.h.

#define plscmap0n   c_plscmap0n

Definition at line 502 of file plplot.h.

#define plscmap1   c_plscmap1

Definition at line 501 of file plplot.h.

#define plscmap1l   c_plscmap1l

Definition at line 504 of file plplot.h.

#define plscmap1n   c_plscmap1n

Definition at line 503 of file plplot.h.

#define plscol0   c_plscol0

Definition at line 505 of file plplot.h.

#define plscolbg   c_plscolbg

Definition at line 506 of file plplot.h.

#define plscolor   c_plscolor

Definition at line 507 of file plplot.h.

Definition at line 508 of file plplot.h.

#define plsdev   c_plsdev

Definition at line 509 of file plplot.h.

#define plsdidev   c_plsdidev

Definition at line 512 of file plplot.h.

#define plsdimap   c_plsdimap

Definition at line 513 of file plplot.h.

#define plsdiori   c_plsdiori

Definition at line 514 of file plplot.h.

#define plsdiplt   c_plsdiplt

Definition at line 510 of file plplot.h.

#define plsdiplz   c_plsdiplz

Definition at line 511 of file plplot.h.

#define plsesc   c_plsesc

Definition at line 516 of file plplot.h.

#define plSetInternalOpt (   a,
  b 
)    plSetOpt(a, b)

Definition at line 224 of file plplot.h.

#define plsetopt   c_plsetopt

Definition at line 515 of file plplot.h.

#define plsfam   c_plsfam

Definition at line 517 of file plplot.h.

#define plsfnam   c_plsfnam

Definition at line 518 of file plplot.h.

#define plshade   c_plshade

Definition at line 520 of file plplot.h.

#define plshade1   c_plshade1

Definition at line 521 of file plplot.h.

#define plshades   c_plshades

Definition at line 519 of file plplot.h.

#define plsmaj   c_plsmaj

Definition at line 522 of file plplot.h.

#define plsmem   c_plsmem

Definition at line 523 of file plplot.h.

#define plsmin   c_plsmin

Definition at line 524 of file plplot.h.

#define plsori   c_plsori

Definition at line 525 of file plplot.h.

#define plspage   c_plspage

Definition at line 526 of file plplot.h.

#define plspause   c_plspause

Definition at line 527 of file plplot.h.

#define plsstrm   c_plsstrm

Definition at line 528 of file plplot.h.

#define plssub   c_plssub

Definition at line 529 of file plplot.h.

#define plssym   c_plssym

Definition at line 530 of file plplot.h.

#define plstar   c_plstar

Definition at line 531 of file plplot.h.

#define plstart   c_plstart

Definition at line 532 of file plplot.h.

#define plstripa   c_plstripa

Definition at line 533 of file plplot.h.

#define plstripc   c_plstripc

Definition at line 534 of file plplot.h.

#define plstripd   c_plstripd

Definition at line 535 of file plplot.h.

#define plstyl   c_plstyl

Definition at line 536 of file plplot.h.

#define plsurf3d   c_plsurf3d

Definition at line 488 of file plplot.h.

#define plsvpa   c_plsvpa

Definition at line 537 of file plplot.h.

#define PLSWIN_DEVICE   1 /* device coordinates */

Definition at line 186 of file plplot.h.

#define PLSWIN_WORLD   2 /* world coordinates */

Definition at line 187 of file plplot.h.

#define plsxax   c_plsxax

Definition at line 538 of file plplot.h.

#define plsyax   c_plsyax

Definition at line 539 of file plplot.h.

#define plsym   c_plsym

Definition at line 540 of file plplot.h.

#define plszax   c_plszax

Definition at line 541 of file plplot.h.

#define pltext   c_pltext

Definition at line 542 of file plplot.h.

#define plvasp   c_plvasp

Definition at line 543 of file plplot.h.

#define plvpas   c_plvpas

Definition at line 544 of file plplot.h.

#define plvpor   c_plvpor

Definition at line 545 of file plplot.h.

#define plvsta   c_plvsta

Definition at line 546 of file plplot.h.

#define plw3d   c_plw3d

Definition at line 547 of file plplot.h.

#define plwid   c_plwid

Definition at line 548 of file plplot.h.

#define plwind   c_plwind

Definition at line 549 of file plplot.h.

#define plxormod   c_plxormod

Definition at line 550 of file plplot.h.

#define SURF_CONT   (1 << 5) /* draw contour plot at surface */

Definition at line 1137 of file plplot.h.

#define TOP_CONT   (1 << 4) /* draw contour plot at top xy plane */

Definition at line 1136 of file plplot.h.

#define ZEROW2B   1

Definition at line 179 of file plplot.h.

#define ZEROW2D   2

Definition at line 180 of file plplot.h.


Typedef Documentation

typedef double PLFLT

Definition at line 124 of file plplot.h.

typedef int PLINT

Definition at line 136 of file plplot.h.

typedef void* PLPointer

Definition at line 141 of file plplot.h.


Function Documentation

void c_pl_setcontlabelformat ( PLINT  lexp,
PLINT  sigdig 
)

Definition at line 230 of file plcont.c.

{
    limexp  = lexp;
    sigprec = sigdig;
}
void c_pl_setcontlabelparam ( PLFLT  offset,
PLFLT  size,
PLFLT  spacing,
PLINT  active 
)

Definition at line 221 of file plcont.c.

void c_pladv ( PLINT  page)

Definition at line 15 of file plpage.c.

{
    if (plsc->level < 1) {
       plabort("pladv: Please call plinit first");
       return;
    }

    if (page > 0 && page <= plsc->nsubx * plsc->nsuby)
       plsc->cursub = page;

    else if (page == 0) {
       if (plsc->cursub >= plsc->nsubx * plsc->nsuby) {
           plP_eop();
           plP_bop();
           plsc->cursub = 1;
       }
       else
           plsc->cursub++;
    }
    else {
       plabort("pladv: Invalid subpage number");
       return;
    }

    plP_setsub();
}

Here is the call graph for this function:

void c_plaxes ( PLFLT  x0,
PLFLT  y0,
const char *  xopt,
PLFLT  xtick,
PLINT  nxsub,
const char *  yopt,
PLFLT  ytick,
PLINT  nysub 
)

Definition at line 93 of file plbox.c.

{
    PLINT lax, lbx, lcx, lgx, lix, llx, lsx, ltx;
    PLINT lay, lby, lcy, lgy, liy, lly, lsy, lty;
    PLINT xmajor, xminor, ymajor, yminor;
    PLINT i, i1x, i2x, i3x, i4x, i1y, i2y, i3y, i4y;
    PLINT nxsub1, nysub1;
    PLINT lxmin, lxmax, lymin, lymax;
    PLINT pxmin, pxmax, pymin, pymax;
    PLINT vppxmi, vppxma, vppymi, vppyma;
    PLFLT xtick1, ytick1, vpwxmi, vpwxma, vpwymi, vpwyma;
    PLFLT vpwxmin, vpwxmax, vpwymin, vpwymax;
    PLFLT xp0, yp0, tn, tp, temp;

    if (plsc->level < 3) {
       plabort("plbox: Please set up window first");
       return;
    }

/* Open the clip limits to the subpage limits */

    plP_gclp(&lxmin, &lxmax, &lymin, &lymax);
    plP_gphy(&pxmin, &pxmax, &pymin, &pymax);
    plP_sclp(pxmin, pxmax, pymin, pymax);

    vppxmi = plsc->vppxmi;
    vppxma = plsc->vppxma;
    vppymi = plsc->vppymi;
    vppyma = plsc->vppyma;

/* Convert world coordinates to physical */

    xp0 = plP_wcpcx(x0);
    yp0 = plP_wcpcy(y0);

/* Set plot options from input */

    lax = plP_stsearch(xopt, 'a');
    lbx = plP_stsearch(xopt, 'b');
    lcx = plP_stsearch(xopt, 'c');
    lgx = plP_stsearch(xopt, 'g');
    lix = plP_stsearch(xopt, 'i');
    llx = plP_stsearch(xopt, 'l');
    lsx = plP_stsearch(xopt, 's');
    ltx = plP_stsearch(xopt, 't');

    lay = plP_stsearch(yopt, 'a');
    lby = plP_stsearch(yopt, 'b');
    lcy = plP_stsearch(yopt, 'c');
    lgy = plP_stsearch(yopt, 'g');
    liy = plP_stsearch(yopt, 'i');
    lly = plP_stsearch(yopt, 'l');
    lsy = plP_stsearch(yopt, 's');
    lty = plP_stsearch(yopt, 't');

/* Tick and subtick sizes in device coords */

    xmajor = MAX(ROUND(plsc->majht * plsc->ypmm), 1);
    ymajor = MAX(ROUND(plsc->majht * plsc->xpmm), 1);
    xminor = MAX(ROUND(plsc->minht * plsc->ypmm), 1);
    yminor = MAX(ROUND(plsc->minht * plsc->xpmm), 1);

    nxsub1 = nxsub;
    nysub1 = nysub;
    xtick1 = llx ? 1.0 : xtick;
    ytick1 = lly ? 1.0 : ytick;

    plgvpw(&vpwxmin, &vpwxmax, &vpwymin, &vpwymax);
/* n.b. large change; vpwxmi always numerically less than vpwxma, and
 * similarly for vpwymi */
    vpwxmi = (vpwxmax > vpwxmin) ? vpwxmin : vpwxmax;
    vpwxma = (vpwxmax > vpwxmin) ? vpwxmax : vpwxmin;
    vpwymi = (vpwymax > vpwymin) ? vpwymin : vpwymax;
    vpwyma = (vpwymax > vpwymin) ? vpwymax : vpwymin;

    lax = lax && vpwymi < y0 && y0 < vpwyma ;
    lay = lay && vpwxmi < x0 && x0 < vpwxma ;

/* Calculate tick spacing */

    if (ltx || lgx) 
       pldtik(vpwxmi, vpwxma, &xtick1, &nxsub1);

    if (lty || lgy) 
       pldtik(vpwymi, vpwyma, &ytick1, &nysub1);
/* n.b. large change; xtick1, nxsub1, ytick1, nysub1 always positive. */

/* Set up tick variables */

    if (lix) {
       i1x = xminor;
       i2x = 0;
       i3x = xmajor;
       i4x = 0;
    }
    else {
       i1x = 0;
       i2x = xminor;
       i3x = 0;
       i4x = xmajor;
    }

    if (liy) {
       i1y = yminor;
       i2y = 0;
       i3y = ymajor;
       i4y = 0;
    }
    else {
       i1y = 0;
       i2y = yminor;
       i3y = 0;
       i4y = ymajor;
    }

/* Draw the bottom edge of the box */

    if (lbx) {
       plP_movphy(vppxmi, vppymi);
       if (ltx) {
           tp = xtick1 * floor(vpwxmi / xtick1);
           for (;;) {
              tn = tp + xtick1;
              if (lsx) {
                  if (llx) {
                     for (i = 0; i <= 7; i++) {
                         temp = tp + xlog[i];
                         if (BETW(temp, vpwxmi, vpwxma))
                            plxtik(plP_wcpcx(temp), vppymi, i1x, i2x);
                     }
                  }
                  else {
                     for (i = 1; i <= nxsub1 - 1; i++) {
                         temp = tp + i * xtick1 / nxsub1;
                         if (BETW(temp, vpwxmi, vpwxma))
                            plxtik(plP_wcpcx(temp), vppymi, i1x, i2x);
                     }
                  }
              }
              if (!BETW(tn, vpwxmi, vpwxma))
                  break;
              plxtik(plP_wcpcx(tn), vppymi, i3x, i4x);
              tp = tn;
           }
       }
       plP_draphy(vppxma, vppymi);
    }

/* Draw right-hand edge of box */

    if (lcy) {
       plP_movphy(vppxma, vppymi);
       if (lty) {
           tp = ytick1 * floor(vpwymi / ytick1);
           for (;;) {
              tn = tp + ytick1;
              if (lsy) {
                  if (lly) {
                     for (i = 0; i <= 7; i++) {
                         temp = tp + xlog[i];
                         if (BETW(temp, vpwymi, vpwyma))
                            plytik(vppxma, plP_wcpcy(temp), i2y, i1y);
                     }
                  }
                  else {
                     for (i = 1; i <= nysub1 - 1; i++) {
                         temp = tp + i * ytick1 / nysub1;
                         if (BETW(temp, vpwymi, vpwyma))
                            plytik(vppxma, plP_wcpcy(temp), i2y, i1y);
                     }
                  }
              }
              if (!BETW(tn, vpwymi, vpwyma))
                  break;
              plytik(vppxma, plP_wcpcy(tn), i4y, i3y);
              tp = tn;
           }
       }
       plP_draphy(vppxma, vppyma);
    }

/* Draw the top edge of the box */

    if (lcx) {
       plP_movphy(vppxma, vppyma);
       if (ltx) {
           tp = xtick1 * (floor(vpwxma / xtick1) + 1);
           for (;;) {
              tn = tp - xtick1;
              if (lsx) {
                  if (llx) {
                     for (i = 7; i >= 0; i--) {
                         temp = tn + xlog[i];
                         if (BETW(temp, vpwxmi, vpwxma))
                            plxtik(plP_wcpcx(temp), vppyma, i2x, i1x);
                     }
                  }
                  else {
                     for (i = nxsub1 - 1; i >= 1; i--) {
                         temp = tn + i * xtick1 / nxsub1;
                         if (BETW(temp, vpwxmi, vpwxma))
                            plxtik(plP_wcpcx(temp), vppyma, i2x, i1x);
                     }
                  }
              }
              if (!BETW(tn, vpwxmi, vpwxma))
                  break;
              plxtik(plP_wcpcx(tn), vppyma, i4x, i3x);
              tp = tn;
           }
       }
       plP_draphy(vppxmi, vppyma);
    }

/* Draw left-hand edge of box */

    if (lby) {
       plP_movphy(vppxmi, vppyma);
       if (lty) {
           tp = ytick1 * (floor(vpwyma / ytick1) + 1);
           for (;;) {
              tn = tp - ytick1;
              if (lsy) {
                  if (lly) {
                     for (i = 7; i >= 0; i--) {
                         temp = tn + xlog[i];
                         if (BETW(temp, vpwymi, vpwyma))
                            plytik(vppxmi, plP_wcpcy(temp), i1y, i2y);
                     }
                  }
                  else {
                     for (i = nysub1 - 1; i >= 1; i--) {
                         temp = tn + i * ytick1 / nysub1;
                         if (BETW(temp, vpwymi, vpwyma))
                            plytik(vppxmi, plP_wcpcy(temp), i1y, i2y);
                     }
                  }
              }
              if (!BETW(tn, vpwymi, vpwyma))
                  break;
              plytik(vppxmi, plP_wcpcy(tn), i3y, i4y);
              tp = tn;
           }
       }
       plP_draphy(vppxmi, vppymi);
    }

/* Draw the horizontal axis */

    if (lax) {
       plP_movphy(vppxmi, yp0);
       if (ltx) {
           tp = xtick1 * floor(vpwxmi / xtick1);
           for (;;) {
              tn = tp + xtick1;
              if (lsx) {
                  if (llx) {
                     for (i = 0; i <= 7; i++) {
                         temp = tp + xlog[i];
                         if (BETW(temp, vpwxmi, vpwxma))
                            plxtik(plP_wcpcx(temp), yp0, xminor, xminor);
                     }
                  }
                  else {
                     for (i = 1; i <= nxsub1 - 1; i++) {
                         temp = tp + i * xtick1 / nxsub1;
                         if (BETW(temp, vpwxmi, vpwxma))
                            plxtik(plP_wcpcx(temp), yp0, xminor, xminor);
                     }
                  }
              }
              if (!BETW(tn, vpwxmi, vpwxma))
                  break;
              plxtik(plP_wcpcx(tn), yp0, xmajor, xmajor);
              tp = tn;
           }
       }
       plP_draphy(vppxma, yp0);
    }

/* Draw the vertical axis */

    if (lay) {
       plP_movphy(xp0, vppymi);
       if (lty) {
           tp = ytick1 * floor(vpwymi / ytick1);
           for (;;) {
              tn = tp + ytick1;
              if (lsy) {
                  if (lly) {
                     for (i = 0; i <= 7; i++) {
                         temp = tp + xlog[i];
                         if (BETW(temp, vpwymi, vpwyma))
                            plytik(xp0, plP_wcpcy(temp), yminor, yminor);
                     }
                  }
                  else {
                     for (i = 1; i <= nysub1 - 1; i++) {
                         temp = tp + i * ytick1 / nysub1;
                         if (BETW(temp, vpwymi, vpwyma))
                            plytik(xp0, plP_wcpcy(temp), yminor, yminor);
                     }
                  }
              }
              if (!BETW(tn, vpwymi, vpwyma))
                  break;
              plytik(xp0, plP_wcpcy(tn), ymajor, ymajor);
              tp = tn;
           }
       }
       plP_draphy(xp0, vppyma);
    }

/* Draw grids */

    grid_box(xopt, xtick1, nxsub1, yopt, ytick1, nysub1);

/* Write labels */

    label_box(xopt, xtick1, yopt, ytick1);

/* Restore the clip limits to viewport edge */

    plP_sclp(lxmin, lxmax, lymin, lymax);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void c_plbin ( PLINT  nbin,
PLFLT x,
PLFLT y,
PLINT  center 
)

Definition at line 97 of file plhist.c.

{
    PLINT i;
    PLFLT xmin, xmax, vpwxmi, vpwxma, vpwymi, vpwyma;

    if (plsc->level < 3) {
       plabort("plbin: Please set up window first");
       return;
    }

    /* Check x[i] are in ascending order */

    for (i = 0; i < nbin - 1; i++) {
       if (x[i] >= x[i + 1]) {
           plabort("plbin: Elements of x array must be increasing");
           return;
       }
    }

    plgvpw(&vpwxmi, &vpwxma, &vpwymi, &vpwyma);
    if (!(flags & 1)) {
       for (i = 0; i < nbin - 1; i++) {
           if (!(flags & 4) || (y[i] != vpwymi)) {
              pljoin(x[i], vpwymi, x[i], y[i]);
              pljoin(x[i], y[i], x[i + 1], y[i]);
              pljoin(x[i + 1], y[i], x[i + 1], vpwymi);
           }
       }
       if (flags & 2) {
           if (!(flags & 4) || (y[i] != vpwymi)) {
              int xm = x[i] + (x[i] - x[i-1]);
              pljoin(x[i], vpwymi, x[i], y[i]);
              pljoin(x[i], y[i], xm, y[i]);
              pljoin(xm, y[i], xm, vpwymi);
           }
       } else {
           if (x[i] < vpwxma) {
              if (!(flags & 4) || (y[i] != vpwymi)) {
                  pljoin(x[i], vpwymi, x[i], y[i]);
                  pljoin(x[i], y[i], vpwxma, y[i]);
                  pljoin(vpwxma, y[i], vpwxma, vpwymi);
              }
           }
       }
    } else {
       if (nbin < 2)
           return;
       if (flags & 2) {
           xmin = MAX(vpwxmi, 0.5 * (3 * x[0] - x[1]));
       } else {
           xmin = vpwxmi;
       }
       /* Vince fixed bug May 1998 */
       xmax = MAX(0.5 * (x[0] + x[1]), vpwxmi);
       if (xmin < xmax) {
           pljoin(xmin, vpwymi, xmin, y[0]);
           pljoin(xmin, y[0], xmax, y[0]);
           pljoin(xmax, y[0], xmax, vpwymi);
       }
       for (i = 1; i < nbin - 1; i++) {
           xmin = xmax;
           xmax = MIN(0.5 * (x[i] + x[i + 1]), vpwxma);
           if (!(flags & 4) || (y[i] != vpwymi)) {
              pljoin(xmin, vpwymi, xmin, y[i]);
              pljoin(xmin, y[i], xmax, y[i]);
              pljoin(xmax, y[i], xmax, vpwymi);
           }
       }
       xmin = xmax;
       xmax = vpwxma;
       if (flags & 2) {
           xmax = MIN(vpwxma, 0.5 * (3 * x[i] - x[i-1]));
       } else {
           xmax = vpwxma;
       }
       if (xmin < xmax) {
           if (!(flags & 4) || (y[i] != vpwymi)) {
              pljoin(xmin, vpwymi, xmin, y[i]);
              pljoin(xmin, y[i], xmax, y[i]);
              pljoin(xmax, y[i], xmax, vpwymi);
           }
       }
    }
}

Here is the call graph for this function:

void c_plbop ( void  )

Definition at line 99 of file plpage.c.

{
    if (plsc->level < 1) {
       plabort("pladv: Please call plinit first");
       return;
    }
    plP_bop();
    plsc->cursub = 1;
    plP_setsub();
}

Here is the call graph for this function:

void c_plbox ( const char *  xopt,
PLFLT  xtick,
PLINT  nxsub,
const char *  yopt,
PLFLT  ytick,
PLINT  nysub 
)

Definition at line 55 of file plbox.c.

{
    c_plaxes(0.0, 0.0, xopt, xtick, nxsub, yopt, ytick, nysub);
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plbox3 ( const char *  xopt,
const char *  xlabel,
PLFLT  xtick,
PLINT  nsubx,
const char *  yopt,
const char *  ylabel,
PLFLT  ytick,
PLINT  nsuby,
const char *  zopt,
const char *  zlabel,
PLFLT  ztick,
PLINT  nsubz 
)

Definition at line 429 of file plbox.c.

{
    PLFLT dx, dy, tx, ty, ux, uy;
    PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale;
    PLFLT cxx, cxy, cyx, cyy, cyz;
    PLINT ln;
    PLINT *zbflg, *zbcol;
    PLFLT *zbtck;
    PLINT xdigmax, xdigits;
    PLINT ydigmax, ydigits;
    PLINT zdigmax, zdigits;

    if (plsc->level < 3) {
       plabort("plbox3: Please set up window first");
       return;
    }

    plP_gw3wc(&cxx, &cxy, &cyx, &cyy, &cyz);
    plP_gdom(&xmin, &xmax, &ymin, &ymax);
    plP_grange(&zscale, &zmin, &zmax);

    plgxax(&xdigmax, &xdigits);
    plgyax(&ydigmax, &ydigits);
    plgzax(&zdigmax, &zdigits);

    xdigits = xdigmax;
    ydigits = ydigmax;
    zdigits = zdigmax;

/* We have to wait until after the plot is drawn to draw back */
/* grid so store this stuff. */

    plP_gzback(&zbflg, &zbcol, &zbtck);
    *zbflg = plP_stsearch(zopt, 'd');
    if (*zbflg) {
       *zbtck = ztick;             /* save tick spacing */
       *zbcol = plsc->icol0;       /* and color */
    }

    if (cxx >= 0.0 && cxy <= 0.0) {
       ln = plP_stsearch(xopt, 'n');
       tx = plP_w3wcx(xmin, ymin, zmin);
       ty = plP_w3wcy(xmin, ymin, zmin);
       ux = plP_w3wcx(xmax, ymin, zmin);
       uy = plP_w3wcy(xmax, ymin, zmin);
       plxybx(xopt, xlabel, tx, ty, ux, uy,
              xmin, xmax, xtick, nsubx, 0, &xdigits);

       dx = ux - tx;
       dy = uy - ty;
       plzbx(zopt, zlabel, 1, dx, dy, ux, uy,
             plP_w3wcy(xmax, ymin, zmax), zmin, zmax, ztick, nsubz, &zdigits);

       tx = plP_w3wcx(xmin, ymax, zmin);
       ty = plP_w3wcy(xmin, ymax, zmin);
       ux = plP_w3wcx(xmin, ymin, zmin);
       uy = plP_w3wcy(xmin, ymin, zmin);
       plxybx(yopt, ylabel, tx, ty, ux, uy,
              ymax, ymin, ytick, nsuby, ln, &ydigits);

       dx = ux - tx;
       dy = uy - ty;
/* restore zdigits to initial value for second call */
        zdigits = zdigmax;     
       plzbx(zopt, zlabel, 0, dx, dy, tx, ty,
             plP_w3wcy(xmin, ymax, zmax), zmin, zmax, ztick, nsubz, &zdigits);
    }
    else if (cxx <= 0.0 && cxy <= 0.0) {
       ln = plP_stsearch(yopt, 'n');
       tx = plP_w3wcx(xmin, ymax, zmin);
       ty = plP_w3wcy(xmin, ymax, zmin);
       ux = plP_w3wcx(xmin, ymin, zmin);
       uy = plP_w3wcy(xmin, ymin, zmin);
       plxybx(yopt, ylabel, tx, ty, ux, uy,
              ymax, ymin, ytick, nsuby, 0, &ydigits);

       dx = ux - tx;
       dy = uy - ty;
       plzbx(zopt, zlabel, 1, dx, dy, ux, uy,
             plP_w3wcy(xmin, ymin, zmax), zmin, zmax, ztick, nsubz, &zdigits);

       tx = plP_w3wcx(xmax, ymax, zmin);
       ty = plP_w3wcy(xmax, ymax, zmin);
       ux = plP_w3wcx(xmin, ymax, zmin);
       uy = plP_w3wcy(xmin, ymax, zmin);
       plxybx(xopt, xlabel, tx, ty, ux, uy,
              xmax, xmin, xtick, nsubx, ln, &xdigits);

       dx = ux - tx;
       dy = uy - ty;
/* restore zdigits to initial value for second call */
        zdigits = zdigmax;     
       plzbx(zopt, zlabel, 0, dx, dy, tx, ty,
             plP_w3wcy(xmax, ymax, zmax), zmin, zmax, ztick, nsubz, &zdigits);
    }
    else if (cxx <= 0.0 && cxy >= 0.0) {
       ln = plP_stsearch(xopt, 'n');
       tx = plP_w3wcx(xmax, ymax, zmin);
       ty = plP_w3wcy(xmax, ymax, zmin);
       ux = plP_w3wcx(xmin, ymax, zmin);
       uy = plP_w3wcy(xmin, ymax, zmin);
       plxybx(xopt, xlabel, tx, ty, ux, uy,
              xmax, xmin, xtick, nsubx, 0, &xdigits);

       dx = ux - tx;
       dy = uy - ty;
       plzbx(zopt, zlabel, 1, dx, dy, ux, uy,
             plP_w3wcy(xmin, ymax, zmax), zmin, zmax, ztick, nsubz, &zdigits);

       tx = plP_w3wcx(xmax, ymin, zmin);
       ty = plP_w3wcy(xmax, ymin, zmin);
       ux = plP_w3wcx(xmax, ymax, zmin);
       uy = plP_w3wcy(xmax, ymax, zmin);
       plxybx(yopt, ylabel, tx, ty, ux, uy,
              ymin, ymax, ytick, nsuby, ln, &ydigits);

       dx = ux - tx;
       dy = uy - ty;
/* restore zdigits to initial value for second call */
        zdigits = zdigmax;     
       plzbx(zopt, zlabel, 0, dx, dy, tx, ty,
             plP_w3wcy(xmax, ymin, zmax), zmin, zmax, ztick, nsubz, &zdigits);
    }
    else if (cxx >= 0.0 && cxy >= 0.0) {
       ln = plP_stsearch(yopt, 'n');
       tx = plP_w3wcx(xmax, ymin, zmin);
       ty = plP_w3wcy(xmax, ymin, zmin);
       ux = plP_w3wcx(xmax, ymax, zmin);
       uy = plP_w3wcy(xmax, ymax, zmin);
       plxybx(yopt, ylabel, tx, ty, ux, uy,
              ymin, ymax, ytick, nsuby, 0, &ydigits);

       dx = ux - tx;
       dy = uy - ty;
       plzbx(zopt, zlabel, 1, dx, dy, ux, uy,
             plP_w3wcy(xmax, ymax, zmax), zmin, zmax, ztick, nsubz, &zdigits);

       tx = plP_w3wcx(xmin, ymin, zmin);
       ty = plP_w3wcy(xmin, ymin, zmin);
       ux = plP_w3wcx(xmax, ymin, zmin);
       uy = plP_w3wcy(xmax, ymin, zmin);
       plxybx(xopt, xlabel, tx, ty, ux, uy,
              xmin, xmax, xtick, nsubx, ln, &xdigits);

       dx = ux - tx;
       dy = uy - ty;
/* restore zdigits to initial value for second call */
        zdigits = zdigmax;     
       plzbx(zopt, zlabel, 0, dx, dy, tx, ty,
             plP_w3wcy(xmin, ymin, zmax), zmin, zmax, ztick, nsubz, &zdigits);
    }
    plsxax(xdigmax, xdigits);
    plsyax(ydigmax, ydigits);
    plszax(zdigmax, zdigits);
}

Here is the call graph for this function:

void c_plcalc_world ( PLFLT  rx,
PLFLT  ry,
PLFLT wx,
PLFLT wy,
PLINT window 
)

Definition at line 252 of file plpage.c.

{
    int i;
    int lastwin = plsc->nplwin - 1;
    int firstwin = MAX(plsc->nplwin - PL_MAXWINDOWS, 0);
    PLWindow *w;

    for (i = lastwin; i >= firstwin; i--) {
       w = &plsc->plwin[i % PL_MAXWINDOWS];
       if ((rx >= w->dxmi) &&
           (rx <= w->dxma) &&
           (ry >= w->dymi) &&
           (ry <= w->dyma) ) {

           *wx = w->wxmi + (rx - w->dxmi) * 
              (w->wxma - w->wxmi) / (w->dxma - w->dxmi);

           *wy = w->wymi + (ry - w->dymi) * 
              (w->wyma - w->wymi) / (w->dyma - w->dymi);
          
           *window = i;

           return;
       }
    }
    /* No valid window found with these relative coordinates. */
    *wx = 0.;
    *wy = 0.;
    *window = -1;
    return;
}

Here is the caller graph for this function:

Definition at line 50 of file plpage.c.

{
    if (plsc->level < 1) {
       plabort("plclear: Please call plinit first");
       return;
    }

    if (plsc->dev_clear)
      plP_esc(PLESC_CLEAR, NULL);
    else { /* driver does not support clear, fill using background color */

         short x[5], y[5];
         int ocolor = plsc->icol0;

         x[0] = x[3] = x[4] = plsc->sppxmi;
         x[1] = x[2] = plsc->sppxma;
         y[0] = y[1] = y[4] = plsc->sppymi;
         y[2] = y[3] = plsc->sppyma;
         plcol0(0);
         plP_fill(x, y, 5);
         plcol0(ocolor);
    }
}

Here is the call graph for this function:

Definition at line 91 of file plctrl.c.

{
    if (plsc->level < 1) {
       plabort("plcol0: Please call plinit first");
       return;
    }
    if (icol0 < 0 || icol0 >= plsc->ncol0) {
       char buffer[256];
       sprintf(buffer, "plcol0: Invalid color map entry: %d", (int) icol0);
       plabort(buffer);
       return;
    }

    plsc->icol0 = icol0;
    plsc->curcolor.r = plsc->cmap0[icol0].r;
    plsc->curcolor.g = plsc->cmap0[icol0].g;
    plsc->curcolor.b = plsc->cmap0[icol0].b;

    plsc->curcmap = 0;
    plP_state(PLSTATE_COLOR0);
}

Here is the call graph for this function:

void c_plcol1 ( PLFLT  col1)

Definition at line 120 of file plctrl.c.

{
    PLINT icol1;

    if (plsc->level < 1) {
       plabort("plcol1: Please call plinit first");
       return;
    }
    if (col1 < 0 || col1 > 1) {
       char buffer[256];
       sprintf(buffer, "plcol1: Invalid color map position: %f", (PLFLT) col1);
       plabort(buffer);
       return;
    }

    icol1 = col1 * plsc->ncol1;
    icol1 = MIN(icol1, plsc->ncol1-1);

    plsc->icol1 = icol1;
    plsc->curcolor.r = plsc->cmap1[plsc->icol1].r;
    plsc->curcolor.g = plsc->cmap1[plsc->icol1].g;
    plsc->curcolor.b = plsc->cmap1[plsc->icol1].b;

    plsc->curcmap = 1;
    plP_state(PLSTATE_COLOR1);
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plcont ( PLFLT **  f,
PLINT  nx,
PLINT  ny,
PLINT  kx,
PLINT  lx,
PLINT  ky,
PLINT  ly,
PLFLT clevel,
PLINT  nlevel,
void(*)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer pltr,
PLPointer  pltr_data 
)

Definition at line 449 of file plcont.c.

{
    PLfGrid2 grid;

    grid.f = f;
    plfcont(plf2eval2, (PLPointer) &grid,
           nx, ny, kx, lx, ky, ly, clevel, nlevel,
           pltr, pltr_data);
}

Here is the call graph for this function:

void c_plcpstrm ( PLINT  iplsr,
PLINT  flags 
)

Definition at line 1468 of file plcore.c.

{
    int i;
    PLStream *plsr;

    plsr = pls[iplsr];
    if (plsr == NULL) {
       fprintf(stderr, "plcpstrm: stream %d not in use\n", (int) iplsr);
       return;
    }

/* May be debugging */

    plsc->debug = plsr->debug;

/* Plot buffer -- need to copy file pointer so that plreplot() works */
/* This also prevents inadvertent writes into the plot buffer */

    plsc->plbufFile = plsr->plbufFile;

/* Driver interface */
/* Transformation must be recalculated in current driver coordinates */

    if (plsr->difilt & PLDI_PLT) 
       plsdiplt(plsr->dipxmin, plsr->dipymin, plsr->dipxmax, plsr->dipymax);

    if (plsr->difilt & PLDI_DEV)
       plsdidev(plsr->mar, plsr->aspect, plsr->jx, plsr->jy);

    if (plsr->difilt & PLDI_ORI)
       plsdiori(plsr->diorot);

/* Map device coordinates */

    if ( ! (flags & 0x01)) {
       pldebug("plcpstrm", "mapping parameters: %d %d %d %d %f %f\n",
              plsr->phyxmi, plsr->phyxma, plsr->phyymi, plsr->phyyma,
              plsr->xpmm, plsr->ypmm);
       plsdimap(plsr->phyxmi, plsr->phyxma, plsr->phyymi, plsr->phyyma,
               plsr->xpmm, plsr->ypmm);
    }

/* current color */

    pl_cpcolor(&plsc->curcolor, &plsr->curcolor);

/* cmap 0 */

    plsc->icol0 = plsr->icol0;
    plsc->ncol0 = plsr->ncol0;
    if (plsc->cmap0 != NULL)
       free((void *) plsc->cmap0);

    plsc->cmap0 = (PLColor *) calloc(1, plsc->ncol0 * sizeof(PLColor));
    for (i = 0; i < plsc->ncol0; i++)
       pl_cpcolor(&plsc->cmap0[i], &plsr->cmap0[i]);

/* cmap 1 */

    plsc->icol1 = plsr->icol1;
    plsc->ncol1 = plsr->ncol1;
    if (plsc->cmap1 != NULL)
       free((void *) plsc->cmap1);

    plsc->cmap1 = (PLColor *) calloc(1, plsc->ncol1 * sizeof(PLColor));
    for (i = 0; i < plsc->ncol1; i++) 
       pl_cpcolor(&plsc->cmap1[i], &plsr->cmap1[i]);

/* Initialize if it hasn't been done yet. */

    if (plsc->level == 0)
       plinit();
}

Here is the call graph for this function:

Definition at line 1279 of file plcore.c.

{
    PLINT i;

    for (i = PL_NSTREAMS-1; i >= 0; i--) {
       if (pls[i] != NULL) {
           plsstrm(i);
           c_plend1();
       }
    }
    plfontrel();
#ifdef ENABLE_DYNDRIVERS
/* Release the libltdl resources */
    lt_dlexit();
#endif
}

Here is the call graph for this function:

Definition at line 1305 of file plcore.c.

{
    if (plsc->level > 0) {
       plP_eop();
       plP_tidy();
       plsc->level = 0;
    }

/* Free all malloc'ed stream memory */

    free_mem(plsc->cmap0);
    free_mem(plsc->cmap1);
    free_mem(plsc->plwindow);
    free_mem(plsc->geometry);
    free_mem(plsc->dev);
    free_mem(plsc->BaseName);

/* Free malloc'ed stream if not in initial stream, else clear it out */

    if (ipls > 0) {
       free_mem(plsc);
       pls[ipls] = NULL;
       plsstrm(0);
    }
    else {
       memset((char *) pls[ipls], 0, sizeof(PLStream));
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

MZ_DLLEXPORT void c_plenv ( PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLINT  just,
PLINT  axis 
)

Definition at line 58 of file plvpor.c.

{
  c_plenvi(xmin, xmax, ymin, ymax, just, axis, 1); 
}

Here is the call graph for this function:

void c_plenv0 ( PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLINT  just,
PLINT  axis 
)

Definition at line 72 of file plvpor.c.

{
  c_plenvi(xmin, xmax, ymin, ymax, just, axis, 0); 
}

Here is the call graph for this function:

void c_pleop ( void  )

Definition at line 81 of file plpage.c.

{
    if (plsc->level < 1) {
       plabort("pleop: Please call plinit first");
       return;
    }

    plsc->cursub = plsc->nsubx * plsc->nsuby;
    plP_eop();
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plerrx ( PLINT  n,
PLFLT xmin,
PLFLT xmax,
PLFLT y 
)

Definition at line 107 of file pltick.c.

{
    PLINT i;

    if (plsc->level < 3) {
       plabort("plerrx: Please set up window first");
       return;
    }

    for (i = 0; i < n; i++)
       plerx1(xmin[i], xmax[i], y[i]);
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plerry ( PLINT  n,
PLFLT x,
PLFLT ymin,
PLFLT ymax 
)

Definition at line 128 of file pltick.c.

{
    PLINT i;

    if (plsc->level < 3) {
       plabort("plerry: Please set up window first");
       return;
    }

    for (i = 0; i < n; i++)
       plery1(x[i], ymin[i], ymax[i]);
}

Here is the call graph for this function:

Definition at line 2434 of file plcore.c.

{
    plsc->famadv = 1;
}
MZ_DLLEXPORT void c_plfill ( PLINT  n,
PLFLT x,
PLFLT y 
)

Definition at line 37 of file plfill.c.

{
    PLINT xpoly[PL_MAXPOLY], ypoly[PL_MAXPOLY];
    PLINT i;

    if (plsc->level < 3) {
       plabort("plfill: Please set up window first");
       return;
    }
    if (n < 3) {
       plabort("plfill: Not enough points in object");
       return;
    }
    if (n > PL_MAXPOLY-1) {
       plwarn("plfill: too many points in polygon");
       n = PL_MAXPOLY;
    }
    for (i = 0; i < n; i++) {
       xpoly[i] = plP_wcpcx(x[i]);
       ypoly[i] = plP_wcpcy(y[i]);
    }

    if (x[0] != x[n-1] || y[0] != y[n-1]) {
       n++;
       xpoly[n-1] = plP_wcpcx(x[0]);
       ypoly[n-1] = plP_wcpcy(y[0]);
    }

    plP_plfclp(xpoly, ypoly, n, plsc->clpxmi, plsc->clpxma,
              plsc->clpymi, plsc->clpyma, plP_fill);
}

Here is the call graph for this function:

void c_plfill3 ( PLINT  n,
PLFLT x,
PLFLT y,
PLFLT z 
)

Definition at line 79 of file plfill.c.

{
    PLFLT tx[PL_MAXPOLY], ty[PL_MAXPOLY], tz[PL_MAXPOLY];
    PLFLT *V[3];
    PLINT xpoly[PL_MAXPOLY], ypoly[PL_MAXPOLY];
    PLINT i;
    PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale;

    if (plsc->level < 3) {
       plabort("plfill3: Please set up window first");
       return;
    }
    if (n < 3) {
       plabort("plfill3: Not enough points in object");
       return;
    }
    if (n > PL_MAXPOLY-1) {
       plwarn("plfill3: too many points in polygon");
       n = PL_MAXPOLY;
    }

    plP_gdom(&xmin, &xmax, &ymin, &ymax);
    plP_grange(&zscale, &zmin, &zmax);
    
    /* copy the vertices so we can clip without corrupting the input */
    for( i=0; i < n; i++ ) {
      tx[i] = x[i]; ty[i] = y[i]; tz[i] = z[i];
    }
    if (tx[0] != tx[n-1] || ty[0] != ty[n-1] || tz[0] != tz[n-1]) {
      tx[n] = tx[0]; ty[n] = ty[0]; tz[n] = tz[0];
      n++;
    }
    V[0] = tx; V[1] = ty; V[2] = tz;
    n = plP_clip_poly(n, V, 0,  1, -xmin);
    n = plP_clip_poly(n, V, 0, -1,  xmax);
    n = plP_clip_poly(n, V, 1,  1, -ymin);
    n = plP_clip_poly(n, V, 1, -1,  ymax);
    n = plP_clip_poly(n, V, 2,  1, -zmin);
    n = plP_clip_poly(n, V, 2, -1,  zmax);
    for( i=0; i < n; i++ ) {
       xpoly[i] = plP_wcpcx(plP_w3wcx( tx[i], ty[i], tz[i] ));
       ypoly[i] = plP_wcpcy(plP_w3wcy( tx[i], ty[i], tz[i] ));
       }

/* AWI: in the past we have used
 *  plP_fill(xpoly, ypoly, n);
 * here, but our educated guess is this fill should be done via the clipping
 * interface instead as below.
 * No example tests this code so one of our users will end up inadvertently
 * testing this for us. 
 *
 * jc: I have checked, and both versions does give the same result, i.e., clipping
 * to the window boundaries. The reason is that the above plP_clip_poly() does
 * the clipping. To check this, is enough to diminish the x/y/z min/max arguments in
 * plw3d() in x08c. But let's keep it, although 10% slower...
 */
    plP_plfclp(xpoly, ypoly, n, plsc->clpxmi, plsc->clpxma,
           plsc->clpymi, plsc->clpyma, plP_fill);
}

Here is the call graph for this function:

Definition at line 1071 of file plcore.c.

{
    if (plsc->dev_flush) {
       (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
                                          PLESC_FLUSH, NULL );
    }
    else {
       if (plsc->OutFile != NULL)
           fflush(plsc->OutFile);
    }
}
void c_plfont ( PLINT  ifont)

Definition at line 983 of file plsym.c.

{
    if (plsc->level < 1) {
       plabort("plfont: Please call plinit first");
       return;
    }
    if (ifont < 1 || ifont > 4) {
       plabort("plfont: Invalid font");
       return;
    }

    plsc->cfont = ifont;
}

Here is the call graph for this function:

void c_plfontld ( PLINT  fnt)

Definition at line 1989 of file plcore.c.

{
    if (ifont != 0)
       ifont = 1;

    if (plsc->level > 0)
       plfntld(ifont);
    else
       initfont = ifont;
}

Here is the call graph for this function:

void c_plgchr ( PLFLT p_def,
PLFLT p_ht 
)

Definition at line 2501 of file plcore.c.

{
    *p_def = plsc->chrdef;
    *p_ht = plsc->chrht;
}
void c_plgcol0 ( PLINT  icol0,
PLINT r,
PLINT g,
PLINT b 
)

Definition at line 216 of file plctrl.c.

{
    if (plsc->cmap0 == NULL)
       plscmap0n(0);

    *r = -1;
    *g = -1;
    *b = -1;

    if (icol0 < 0 || icol0 > plsc->ncol0) {
       char buffer[256];
       sprintf(buffer, "plgcol0: Invalid color index: %d", (int) icol0);
       plabort(buffer);
       return;
    }

    *r = plsc->cmap0[icol0].r;
    *g = plsc->cmap0[icol0].g;
    *b = plsc->cmap0[icol0].b;

    return;
}

Here is the call graph for this function:

void c_plgcolbg ( PLINT r,
PLINT g,
PLINT b 
)

Definition at line 167 of file plctrl.c.

{
    plgcol0(0, r, g, b);
}
void c_plgcompression ( PLINT compression)

Definition at line 2678 of file plcore.c.

{
    *compression = plsc->dev_compression;
}
void c_plgdev ( char *  p_dev)

Definition at line 2149 of file plcore.c.

{
    strcpy(p_dev, plsc->DevName);
}
void c_plgdidev ( PLFLT p_mar,
PLFLT p_aspect,
PLFLT p_jx,
PLFLT p_jy 
)

Definition at line 883 of file plcore.c.

{
    *p_mar = plsc->mar;
    *p_aspect = plsc->aspect;
    *p_jx = plsc->jx;
    *p_jy = plsc->jy;
}
void c_plgdiori ( PLFLT p_rot)

Definition at line 987 of file plcore.c.

{
    *p_rot = plsc->diorot;
}
void c_plgdiplt ( PLFLT p_xmin,
PLFLT p_ymin,
PLFLT p_xmax,
PLFLT p_ymax 
)

Definition at line 755 of file plcore.c.

{
    *p_xmin = plsc->dipxmin;
    *p_xmax = plsc->dipxmax;
    *p_ymin = plsc->dipymin;
    *p_ymax = plsc->dipymax;
}
void c_plgfam ( PLINT p_fam,
PLINT p_num,
PLINT p_bmax 
)

Definition at line 2408 of file plcore.c.

{
    *p_fam = plsc->family;
    *p_num = plsc->member;
    *p_bmax = plsc->bytemax;
}
void c_plgfnam ( char *  fnam)

Definition at line 2290 of file plcore.c.

{
    if (fnam == NULL) {
       plabort("filename string must be preallocated to >=80 bytes");
       return;
    }

    *fnam = '\0';
    if (plsc->FileName != NULL) {
       strncpy(fnam, plsc->FileName, 79);
       fnam[79] = '\0';
    }
}

Here is the call graph for this function:

void c_plglevel ( PLINT p_level)

Definition at line 2187 of file plcore.c.

{
    *p_level = plsc->level;
}
void c_plgpage ( PLFLT p_xp,
PLFLT p_yp,
PLINT p_xleng,
PLINT p_yleng,
PLINT p_xoff,
PLINT p_yoff 
)

Definition at line 2075 of file plcore.c.

{
    *p_xp = plsc->xdpi;
    *p_yp = plsc->ydpi;
    *p_xleng = plsc->xlength;
    *p_yleng = plsc->ylength;
    *p_xoff = plsc->xoffset;
    *p_yoff = plsc->yoffset;
}
void c_plgra ( void  )

Definition at line 1031 of file plctrl.c.

{
    if (plsc->level > 0)
       plP_esc(PLESC_GRAPH, NULL);
}

Here is the call graph for this function:

void c_plgriddata ( PLFLT x,
PLFLT y,
PLFLT z,
int  npts,
PLFLT xg,
int  nptsx,
PLFLT yg,
int  nptsy,
PLFLT **  zg,
int  type,
PLFLT  data 
)

Definition at line 90 of file plgridd.c.

{
  int i, j;

  if(npts < 1 || nptsx < 1 || nptsy < 1) {
    plabort("plgriddata: Bad array dimensions"); 
    return;
  }

  /* Check that points in xg and in yg are strictly increasing */

  for (i = 0; i < nptsx - 1; i++) {
    if (xg[i] >= xg[i + 1]) {
      plabort("plgriddata: xg array must be strictly increasing");
      return;
    }
  }
  for (i = 0; i < nptsy - 1; i++) {
    if (yg[i] >= yg[i + 1]) {
      plabort("plgriddata: yg array must be strictly increasing");
      return;
    }
  }

  /* clear array to return */
  for(i=0; i<nptsx; i++)
    for(j=0; j<nptsy; j++)
      zg[i][j] = 0.; /* NaN signals a not processed grid point */

  switch (type) {
    
  case (GRID_CSA):     /*  Bivariate Cubic Spline Approximation */
#ifdef WITH_CSA
    grid_csa(x, y, z, npts, xg, nptsx, yg, nptsy, zg);
#else
    plabort("plgriddata(): PLplot was configured to not use GRID_CSA.");
#endif
    break;

  case (GRID_NNIDW): /* Nearest Neighbors Inverse Distance Weighted */
    grid_nnidw(x, y, z, npts, xg, nptsx, yg, nptsy, zg, (int) data);
    break;

  case (GRID_NNLI): /* Nearest Neighbors Linear Interpolation */
    grid_nnli(x, y, z, npts, xg, nptsx, yg, nptsy, zg, data);
    break;

  case (GRID_NNAIDW): /* Nearest Neighbors "Around" Inverse Distance Weighted */
    grid_nnaidw(x, y, z, npts, xg, nptsx, yg, nptsy, zg);
    break;

  case (GRID_DTLI): /* Delaunay Triangulation Linear Interpolation */
#ifdef HAVE_QHULL
    grid_dtli(x, y, z, npts, xg, nptsx, yg, nptsy, zg);
#else
    plabort("plgriddata(): you must have Qhull to use GRID_DTLI.");
#endif
    break;

  case (GRID_NNI): /* Natural Neighbors */
#ifdef HAVE_QHULL
    grid_nni(x, y, z, npts, xg, nptsx, yg, nptsy, zg, data);
#else
    plabort("plgriddata(): you must have Qhull to use GRID_NNI.");
#endif
    break;

  default:
    plabort("plgriddata: unknown algorithm type"); 
  }
}

Here is the call graph for this function:

void c_plgspa ( PLFLT xmin,
PLFLT xmax,
PLFLT ymin,
PLFLT ymax 
)

Definition at line 192 of file plpage.c.

{
    if (plsc->level < 1) {
       plabort("plgspa: Please call plinit first");
       return;
    }
    *xmin = plP_dcmmx(plsc->spdxmi);
    *xmax = plP_dcmmx(plsc->spdxma);
    *ymin = plP_dcmmy(plsc->spdymi);
    *ymax = plP_dcmmy(plsc->spdyma);
}

Here is the call graph for this function:

void c_plgstrm ( PLINT p_strm)

Definition at line 1370 of file plcore.c.

{
    *p_strm = ipls;
}
void c_plgver ( char *  p_ver)

Definition at line 2383 of file plcore.c.

{
    strcpy(p_ver, VERSION);
}
void c_plgvpd ( PLFLT p_xmin,
PLFLT p_xmax,
PLFLT p_ymin,
PLFLT p_ymax 
)

Definition at line 2510 of file plcore.c.

{
    *p_xmin = plsc->vpdxmi;
    *p_xmax = plsc->vpdxma;
    *p_ymin = plsc->vpdymi;
    *p_ymax = plsc->vpdyma;
}
void c_plgvpw ( PLFLT p_xmin,
PLFLT p_xmax,
PLFLT p_ymin,
PLFLT p_ymax 
)

Definition at line 2521 of file plcore.c.

{
    *p_xmin = plsc->vpwxmi;
    *p_xmax = plsc->vpwxma;
    *p_ymin = plsc->vpwymi;
    *p_ymax = plsc->vpwyma;
}
void c_plgxax ( PLINT p_digmax,
PLINT p_digits 
)

Definition at line 2447 of file plcore.c.

{
    *p_digmax = plsc->xdigmax;
    *p_digits = plsc->xdigits;
}
void c_plgyax ( PLINT p_digmax,
PLINT p_digits 
)

Definition at line 2465 of file plcore.c.

{
    *p_digmax = plsc->ydigmax;
    *p_digits = plsc->ydigits;
}
void c_plgzax ( PLINT p_digmax,
PLINT p_digits 
)

Definition at line 2483 of file plcore.c.

{
    *p_digmax = plsc->zdigmax;
    *p_digits = plsc->zdigits;
}
void c_plhist ( PLINT  n,
PLFLT data,
PLFLT  datmin,
PLFLT  datmax,
PLINT  nbin,
PLINT  oldwin 
)

Definition at line 25 of file plhist.c.

{
    PLINT i, bin;
    PLFLT *x, *y, dx, ymax;

    if (plsc->level < 1) {
       plabort("plhist: Please call plinit first");
       return;
    }
    if (plsc->level < 3 && (flags & 1)) {
       plabort("plhist: Please set up window first");
       return;
    }
    if (datmin >= datmax) {
       plabort("plhist: Data range invalid");
       return;
    }
    if ( ! (x = (PLFLT *) malloc((size_t) nbin * sizeof(PLFLT)))) {
       plabort("plhist: Out of memory");
       return;
    }
    if ( ! (y = (PLFLT *) malloc((size_t) nbin * sizeof(PLFLT)))) {
       free((void *) x);
       plabort("plhist: Out of memory");
       return;
    }

    dx = (datmax - datmin) / nbin;
    for (i = 0; i < nbin; i++) {
       x[i] = datmin + i * dx;
       y[i] = 0.0;
    }

    for (i = 0; i < n; i++) {
       bin = (data[i] - datmin) / dx;
       if ((flags & 2) == 0) {
           bin = bin > 0 ? bin : 0;
           bin = bin < nbin ? bin : nbin - 1;
           y[bin]++;
       } else {
           if(bin >= 0 && bin < nbin) {
              y[bin]++;
           }
       }
    }

    if (!(flags & 1)) {
       ymax = 0.0;
       for (i = 0; i < nbin; i++)
           ymax = MAX(ymax, y[i]);

       plenv(datmin, datmax, (PLFLT) 0.0, (PLFLT) (1.1 * ymax), 0, 0);
    }
    /* We pass on the highest couple of bits to the 'plbin' routine */
    plbin(nbin, x, y, (flags & (4+8+16+32)) >> 2);
    free((void *) x);
    free((void *) y);
}

Here is the call graph for this function:

void c_plhls ( PLFLT  h,
PLFLT  l,
PLFLT  s 
)

Definition at line 792 of file plctrl.c.

{
    PLFLT r, g, b;

    plHLS_RGB(h, l, s, &r, &g, &b);
    plrgb(r, g, b);
}

Here is the call graph for this function:

Definition at line 1159 of file plcore.c.

{
    PLFLT lx, ly, xpmm_loc, ypmm_loc, aspect_old, aspect_new;
    PLINT mk = 0, sp = 0, inc = 0, del = 2000;

    pllib_init();

    if (plsc->level != 0)
       plend1();

/* Set stream number */

    plsc->ipls = ipls;

/* Set up devices */

    pllib_devinit();

/* Auxiliary stream setup */

    plstrm_init();

/* Initialize device & first page */

    plP_init();
    plP_bop();
    plsc->level = 1;

/* Calculate factor such that the character aspect ratio is preserved 
 * when the overall aspect ratio is changed, i.e., if portrait mode is
 * requested (only honored for subset of drivers) or if the aspect ratio
 * is specified in any way, or if a 90 deg rotation occurs with
 * -freeaspect. */
   
/* Case where plsc->aspect has a value.... (e.g., -a aspect on the
 * command line or 2nd parameter of plsdidev specified) */
    if (plsc->aspect > 0.) {
       lx = plsc->phyxlen / plsc->xpmm;
       ly = plsc->phyylen / plsc->ypmm;
       aspect_old = lx / ly;
       aspect_new = plsc->aspect;
       plsc->caspfactor = sqrt(aspect_old/aspect_new);
    }
/* Case of 90 deg rotations with -freeaspect (this is also how portraite
 * mode is implemented for the drivers that honor -portrait). */
    else if (plsc->freeaspect && ABS(cos(plsc->diorot * PI / 2.)) <= 1.e-5) {
       lx = plsc->phyxlen / plsc->xpmm;
       ly = plsc->phyylen / plsc->ypmm;
       aspect_old = lx / ly;
       aspect_new = ly / lx;
       plsc->caspfactor = sqrt(aspect_old/aspect_new);
    }

    else
       plsc->caspfactor = 1.;

/* Load fonts */

    plsc->cfont = 1;
    plfntld(initfont);

/* Set up subpages */

    plP_subpInit();

/* Set up number of allowed digits before switching to scientific notation */
/* The user can always change this */

    if (plsc->xdigmax == 0)
       plsc->xdigmax = 4;

    if (plsc->ydigmax == 0)
       plsc->ydigmax = 4;

    if (plsc->zdigmax == 0)
       plsc->zdigmax = 3;

/* Switch to graphics mode and set color */

    plgra();
    plcol(1);

    plstyl(0, &mk, &sp);
    plpat(1, &inc, &del);

/* Set clip limits. */

    plsc->clpxmi = plsc->phyxmi;
    plsc->clpxma = plsc->phyxma;
    plsc->clpymi = plsc->phyymi;
    plsc->clpyma = plsc->phyyma;

/* Page aspect ratio. */

    lx = plsc->phyxlen / plsc->xpmm;
    ly = plsc->phyylen / plsc->ypmm;
    plsc->aspdev = lx / ly;

/* Initialize driver interface */

    pldi_ini();

/* Apply compensating factor to original xpmm and ypmm so that 
 * character aspect ratio is preserved when overall aspect ratio
 * is changed.  This must appear here in the code because previous
 * code in this routine and in routines that it calls must use the original
 * values of xpmm and ypmm before the compensating factor is applied.  */

    plP_gpixmm(&xpmm_loc, &ypmm_loc);
    plP_setpxl(xpmm_loc*plsc->caspfactor, ypmm_loc/plsc->caspfactor); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

MZ_DLLEXPORT void c_pljoin ( PLFLT  x1,
PLFLT  y1,
PLFLT  x2,
PLFLT  y2 
)

Definition at line 45 of file plline.c.

{
    plP_movwor(x1, y1);
    plP_drawor(x2, y2);
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_pllab ( const char *  xlabel,
const char *  ylabel,
const char *  tlabel 
)

Definition at line 348 of file plsym.c.

{
    if (plsc->level < 2) {
       plabort("pllab: Please set up viewport first");
       return;
    }

    plmtex("t", (PLFLT) 2.0, (PLFLT) 0.5, (PLFLT) 0.5, tlabel);
    plmtex("b", (PLFLT) 3.2, (PLFLT) 0.5, (PLFLT) 0.5, xlabel);
    plmtex("l", (PLFLT) 5.0, (PLFLT) 0.5, (PLFLT) 0.5, ylabel);
}

Here is the call graph for this function:

void c_pllightsource ( PLFLT  x,
PLFLT  y,
PLFLT  z 
)

Definition at line 74 of file plot3d.c.

{
    xlight = x;
    ylight = y;
    zlight = z;
}
MZ_DLLEXPORT void c_plline ( PLINT  n,
PLFLT x,
PLFLT y 
)

Definition at line 59 of file plline.c.

{
    if (plsc->level < 3) {
       plabort("plline: Please set up window first");
       return;
    }
    plP_drawor_poly(x, y, n);
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plline3 ( PLINT  n,
PLFLT x,
PLFLT y,
PLFLT z 
)

Definition at line 79 of file plline.c.

{
    int i;
    PLFLT vmin[3], vmax[3], zscale;

    if (plsc->level < 3) {
       plabort("plline3: Please set up window first");
       return;
    }

    /* get the bounding box in 3d */
    plP_gdom(&vmin[0], &vmax[0], &vmin[1], &vmax[1]);
    plP_grange(&zscale, &vmin[2], &vmax[2]);

    /* interate over the vertices */
    for( i=0; i < n-1; i++ ) {
      PLFLT p0[3], p1[3];
      int axis;

      /* copy the end points of the segment to allow clipping */
      p0[0] = x[i]; p0[1] = y[i]; p0[2] = z[i];
      p1[0] = x[i+1]; p1[1] = y[i+1]; p1[2] = z[i+1];

      /* check against each axis of the bounding box */
      for(axis = 0; axis < 3; axis++) {
       if(p0[axis] < vmin[axis]) { /* first out */
         if(p1[axis] < vmin[axis]) {
           break; /* both endpoints out so quit */
         } else {
           int j;
           /* interpolate to find intersection with box */
           PLFLT t = (vmin[axis] - p0[axis]) / (p1[axis] - p0[axis]);
           p0[axis] = vmin[axis];
           for(j = 1; j<3; j++) {
             int k = (axis+j)%3;
             p0[k] = (1-t)*p0[k] + t*p1[k];
           }
         }
       } else if(p1[axis] < vmin[axis]) { /* second out */
         int j;
         /* interpolate to find intersection with box */
         PLFLT t = (vmin[axis] - p0[axis]) / (p1[axis] - p0[axis]);
         p1[axis] = vmin[axis];
         for(j = 1; j<3; j++) {
           int k = (axis+j)%3;
           p1[k] = (1-t)*p0[k] + t*p1[k];
         }
       }
       if(p0[axis] > vmax[axis]) { /* first out */
         if(p1[axis] > vmax[axis]) {
           break; /* both out so quit */
         } else {
           int j;
           /* interpolate to find intersection with box */
           PLFLT t = (vmax[axis] - p0[axis]) / (p1[axis] - p0[axis]);
           p0[axis] = vmax[axis];
           for(j = 1; j<3; j++) {
             int k = (axis+j)%3;
             p0[k] = (1-t)*p0[k] + t*p1[k];
           }
         }
       } else if(p1[axis] > vmax[axis]) { /* second out */
         int j;
         /* interpolate to find intersection with box */
         PLFLT t = (vmax[axis] - p0[axis]) / (p1[axis] - p0[axis]);
         p1[axis] = vmax[axis];
         for(j = 1; j<3; j++) {
           int k = (axis+j)%3;
           p1[k] = (1-t)*p0[k] + t*p1[k];
         }
       }
      }
      /* if we made it to here without "break"ing out of the loop, the 
        remaining segment is visible */
      if( axis == 3 ) { /*  not clipped away */
       PLFLT u0, v0, u1, v1;
       u0 = plP_wcpcx(plP_w3wcx( p0[0], p0[1], p0[2] ));
       v0 = plP_wcpcy(plP_w3wcy( p0[0], p0[1], p0[2] ));
       u1 = plP_wcpcx(plP_w3wcx( p1[0], p1[1], p1[2] ));
       v1 = plP_wcpcy(plP_w3wcy( p1[0], p1[1], p1[2] ));
       plP_movphy(u0,v0);
       plP_draphy(u1,v1);
      }
    }
    return;
}

Here is the call graph for this function:

void c_pllsty ( PLINT  lin)

Definition at line 245 of file plsdef.c.

{
    if (plsc->level < 1) {
       plabort("pllsty: Please call plinit first");
       return;
    }
    if (lin < 1 || lin > 8) {
       plabort("pllsty: Invalid line style");
       return;
    }

    plstyl(line[lin - 1].nels,
          &line[lin - 1].mark[0], &line[lin - 1].space[0]);
}

Here is the call graph for this function:

void c_plmesh ( PLFLT x,
PLFLT y,
PLFLT **  z,
PLINT  nx,
PLINT  ny,
PLINT  opt 
)

Definition at line 91 of file plot3d.c.

{
  c_plot3dc(x, y, z, nx, ny, opt | MESH, NULL, 0);
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plmeshc ( PLFLT x,
PLFLT y,
PLFLT **  z,
PLINT  nx,
PLINT  ny,
PLINT  opt,
PLFLT clevel,
PLINT  nlevel 
)

Definition at line 117 of file plot3d.c.

{
    plot3dc(x, y, z, nx, ny, opt | MESH, clevel, nlevel);
}
void c_plmkstrm ( PLINT p_strm)

Definition at line 1389 of file plcore.c.

{
    int i;

    for (i = 1; i < PL_NSTREAMS; i++) {
       if (pls[i] == NULL)
           break;
    }

    if (i == PL_NSTREAMS) {
       fprintf(stderr, "plmkstrm: Cannot create new stream\n");
       *p_strm = -1;
    }
    else {
       *p_strm = i;
       plsstrm(i);
    }
    plstrm_init();
}

Here is the call graph for this function:

void c_plmtex ( const char *  side,
PLFLT  disp,
PLFLT  pos,
PLFLT  just,
const char *  text 
)

Definition at line 392 of file plsym.c.

{
    PLINT clpxmi, clpxma, clpymi, clpyma;
    PLINT vert, refx, refy, x, y;
    PLFLT xdv, ydv, xmm, ymm, refxmm, refymm, shift, xform[4];
    PLFLT chrdef, chrht;
    PLFLT dispx, dispy;

    if (plsc->level < 2) {
       plabort("plmtex: Please set up viewport first");
       return;
    }

/* Open clip limits to subpage limits */

    plP_gclp(&clpxmi, &clpxma, &clpymi, &clpyma); /* get and store current clip limits */
    plP_sclp(plsc->sppxmi, plsc->sppxma, plsc->sppymi, plsc->sppyma);

    if (plP_stindex(side, "BV") != -1 || plP_stindex(side, "bv") != -1) {
       vert = 1;
       xdv  = plsc->vpdxmi + (plsc->vpdxma - plsc->vpdxmi) * pos;
       ydv  = plsc->vpdymi;
       dispx = 0;
       dispy = -disp;
    }
    else if (plP_stindex(side, "TV") != -1 || plP_stindex(side, "tv") != -1) {
       vert = 1;
       xdv  = plsc->vpdxmi + (plsc->vpdxma - plsc->vpdxmi) * pos;
       ydv  = plsc->vpdyma;
       dispx = 0;
       dispy = disp;
    }
    else if (plP_stsearch(side, 'b')) {
       vert = 0;
       xdv = plsc->vpdxmi + (plsc->vpdxma - plsc->vpdxmi) * pos;
       ydv = plsc->vpdymi;
       dispx = 0;
       dispy = -disp;

    } else if (plP_stsearch(side, 't')) {
       vert = 0;
       xdv = plsc->vpdxmi + (plsc->vpdxma - plsc->vpdxmi) * pos;
       ydv = plsc->vpdyma;
       dispx = 0;
       dispy = disp;

    } else if (plP_stindex(side, "LV") != -1 || plP_stindex(side, "lv") != -1) {
       vert = 0;
       xdv = plsc->vpdxmi;
       ydv = plsc->vpdymi + (plsc->vpdyma - plsc->vpdymi) * pos;
       dispx = -disp;
       dispy = 0;

    } else if (plP_stindex(side, "RV") != -1 || plP_stindex(side, "rv") != -1) {
       vert = 0;
       xdv = plsc->vpdxma;
       ydv = plsc->vpdymi + (plsc->vpdyma - plsc->vpdymi) * pos;
       dispx = disp;
       dispy = 0;

    } else if (plP_stsearch(side, 'l')) {
       vert = 1;
       xdv = plsc->vpdxmi;
       ydv = plsc->vpdymi + (plsc->vpdyma - plsc->vpdymi) * pos;
       dispx = -disp;
       dispy = 0;

    } else if (plP_stsearch(side, 'r')) {
       vert = 1;
       xdv = plsc->vpdxma;
       ydv = plsc->vpdymi + (plsc->vpdyma - plsc->vpdymi) * pos;
       dispx = disp;
       dispy = 0;

    } else {
       plP_sclp(clpxmi, clpxma, clpymi, clpyma); /* restore initial clip limits */
       return;
    }

/* Transformation matrix */

    if (vert != 0) {
       xform[0] = 0.0;
       xform[1] = -1.0;
       xform[2] = 1.0;
       xform[3] = 0.0;
    } else {
       xform[0] = 1.0;
       xform[1] = 0.0;
       xform[2] = 0.0;
       xform[3] = 1.0;
    }

/* Convert to physical units (mm) and compute shifts */

    plgchr(&chrdef, &chrht);
    shift = (just == 0.0) ? 0.0 : plstrl(text) * just;

    xmm = plP_dcmmx(xdv) + dispx * chrht;
    ymm = plP_dcmmy(ydv) + dispy * chrht;
    refxmm = xmm - shift * xform[0];
    refymm = ymm - shift * xform[2];

/* Convert to device units (pixels) and call text plotter */

    x = plP_mmpcx(xmm);
    y = plP_mmpcy(ymm);
    refx = plP_mmpcx(refxmm);
    refy = plP_mmpcy(refymm);

    plP_text(0, just, xform, x, y, refx, refy, text);
    plP_sclp(clpxmi, clpxma, clpymi, clpyma); /* restore clip limits */
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plot3d ( PLFLT x,
PLFLT y,
PLFLT **  z,
PLINT  nx,
PLINT  ny,
PLINT  opt,
PLINT  side 
)

Definition at line 598 of file plot3d.c.

{
  c_plot3dc( x, y, z, nx, ny, opt | (side == 1 ? DRAW_SIDES : 0), NULL, 0);
}

Here is the call graph for this function:

void c_plot3dc ( PLFLT x,
PLFLT y,
PLFLT **  z,
PLINT  nx,
PLINT  ny,
PLINT  opt,
PLFLT clevel,
PLINT  nlevel 
)

Definition at line 625 of file plot3d.c.

{
    PLFLT cxx, cxy, cyx, cyy, cyz;
    PLINT init, i, ix, iy, color;
    PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale;
    PLINT ixmin=0, ixmax=nx-1, iymin=0, iymax=ny-1;
    PLINT clipped = 0, base_cont = 0, side = 0;

    pl3mode = 0;

    if (plsc->level < 3) {
       myabort("plot3dc: Please set up window first");
       return;
    }

    if (opt < 1) {
       myabort("plot3dc: Bad option");
       return;
    }

    if (nx <= 0 || ny <= 0) {
       myabort("plot3dc: Bad array dimensions.");
       return;
    }

    plP_gdom(&xmin, &xmax, &ymin, &ymax);
    plP_grange(&zscale, &zmin, &zmax);
    if(zmin > zmax) {
      PLFLT t = zmin;
      zmin = zmax;
      zmax = t;
    }

/* Check that points in x and in y are strictly increasing */

    for (i = 0; i < nx - 1; i++) {
       if (x[i] >= x[i + 1]) {
           myabort("plot3dc: X array must be strictly increasing");
           return;
       }
    }
    for (i = 0; i < ny - 1; i++) {
       if (y[i] >= y[i + 1]) {
           myabort("plot3dc: Y array must be strictly increasing");
           return;
       }
    }

    if (opt & MESH)
      pl3mode = 1;

    if (opt & DRAW_SIDES)
      side = 1;

    /* figure out the part of the data to use */
    if (xmin < x[0])
      xmin = x[0];
    if (xmax > x[nx-1])
      xmax = x[nx-1];
    if (ymin < y[0])
      ymin = y[0];
    if (ymax > y[ny-1])
      ymax = y[ny-1];
    for (ixmin = 0; ixmin < nx-1 && x[ixmin+1] < xmin; ixmin++) {}
    for (ixmax = nx-1; ixmax > 0 && x[ixmax-1] > xmax; ixmax--) {}
    for (iymin = 0; iymin < ny-1 && y[iymin+1] < ymin; iymin++) {}
    for (iymax = ny-1; iymax > 0 && y[iymax-1] > ymax; iymax--) {}
    /*fprintf(stderr, "(%d,%d) %d %d %d %d\n", nx, ny, ixmin, ixmax, iymin, iymax);*/
    /* do we need to clip? */
    if(ixmin > 0 || ixmax < nx-1 || iymin > 0 || iymax < ny-1) {
      /* adjust the input so it stays within bounds */
      int _nx = ixmax - ixmin + 1;
      int _ny = iymax - iymin + 1;
      PLFLT *_x, *_y, **_z;
      PLFLT ty0, ty1, tx0, tx1;
      int i, j;

      if(_nx <= 1 || _ny <= 1) {
       fprintf(stderr, "bail\n");
       return;
      }

      /* allocate storage for new versions of the input vectors */
      _x = (PLFLT*)malloc(_nx * sizeof(PLFLT));
      _y = (PLFLT*)malloc(_ny * sizeof(PLFLT));
      _z = (PLFLT**)malloc(_nx * sizeof(PLFLT*));

      clipped = 1;

      /* copy over the independent variables */
      _x[0] = xmin;
      _x[_nx-1] = xmax;
      for(i=1; i<_nx-1; i++)
       _x[i] = x[ixmin+i];
      _y[0] = ymin;
      _y[_ny-1] = ymax;
      for(i=1; i<_ny-1; i++)
       _y[i] = y[iymin+i];

      /* copy the data array so we can interpolate around the edges */
      for(i=0; i<_nx; i++)
       _z[i] = (PLFLT*)malloc(_ny * sizeof(PLFLT));

      /* interpolation factors for the 4 edges */
      ty0 = (_y[0] - y[iymin]) / (y[iymin+1] - y[iymin]);
      ty1 = (_y[_ny-1] - y[iymax-1]) / (y[iymax] - y[iymax-1]);
      tx0 = (_x[0] - x[ixmin]) / (x[ixmin+1] - x[ixmin]);
      tx1 = (_x[_nx-1] - x[ixmax-1]) / (x[ixmax] - x[ixmax-1]);
      for(i=0; i<_nx; i++) {
       if(i==0) {
         _z[i][0] = z[ixmin][iymin]*(1-ty0)*(1-tx0) + z[ixmin][iymin+1]*(1-tx0)*ty0
           + z[ixmin+1][iymin]*tx0*(1-ty0) + z[ixmin+1][iymin+1]*tx0*ty0;
         for(j=1; j<_ny-1; j++)
           _z[i][j] = z[ixmin][iymin+j]*(1-tx0) + z[ixmin+1][iymin+j]*tx0;
         _z[i][_ny-1] = z[ixmin][iymax-1]*(1-tx0)*(1-ty1) + z[ixmin][iymax]*(1-tx0)*ty1
           + z[ixmin+1][iymax-1]*tx0*(1-ty1) + z[ixmin+1][iymax]*tx0*ty1;
       } else if(i==_nx-1) {
         _z[i][0] = z[ixmax-1][iymin]*(1-tx1)*(1-ty0) + z[ixmax-1][iymin+1]*(1-tx1)*ty0
           + z[ixmax][iymin]*tx1*(1-ty0) + z[ixmax][iymin+1]*tx1*ty0;
         for(j=1; j<_ny-1; j++)
           _z[i][j] = z[ixmax-1][iymin+j]*(1-tx1) + z[ixmax][iymin+j]*tx1;
         _z[i][_ny-1] = z[ixmax-1][iymax-1]*(1-tx1)*(1-ty1) + z[ixmax][iymax]*(1-tx1)*ty1
           + z[ixmax][iymax-1]*tx1*(1-ty1) + z[ixmax][iymax]*tx1*ty1;
       } else {
         _z[i][0] = z[ixmin+i][iymin]*(1-ty0) + z[ixmin+i][iymin+1]*ty0;
         for(j=1; j<_ny-1; j++)
           _z[i][j] = z[ixmin+i][iymin+j];
         _z[i][_ny-1] = z[ixmin+i][iymax-1]*(1-ty1) + z[ixmin+i][iymax]*ty1;
       }
       for(j=0; j<_ny; j++) {
         if(_z[i][j] < zmin)
           _z[i][j] = zmin;
         else if(_z[i][j] > zmax)
           _z[i][j] = zmax;
       }
      }
      /* replace the input with our clipped versions */
      x = _x;
      y = _y;
      z = _z;
      nx = _nx;
      ny = _ny;        
    }

   if (opt & BASE_CONT || opt & TOP_CONT || opt && MAG_COLOR ) { 
     /*  
      * Don't use the data z value to scale the color, use the z axis
      * values set by plw3d()
      *
      * plMinMax2dGrid(z, nx, ny, &fc_maxz, &fc_minz);
      */
     
     fc_minz = plsc->ranmi;
     fc_maxz = plsc->ranma;     

     if (fc_maxz == fc_minz) {
       plwarn("plot3dc: Maximum and minimum Z values are equal! \"fixing\"...");
       fc_maxz = fc_minz + 1e-6;
     }
   }
 
   if (opt & BASE_CONT) {     /* If enabled, draw the contour at the base.  */
     if (clevel != NULL && nlevel != 0) {
       base_cont = 1;
       /* even if MESH is not set, "set it",
         as the base contour can only be done in this case */
       pl3mode = 1; 
     }
   }

   if (opt & MAG_COLOR) {     /* If enabled, use magnitude colored wireframe  */
     ctmp = (PLFLT *) malloc((size_t) (2 * MAX(nx, ny) * sizeof(PLFLT)));
   } else
     ctmp = NULL;

   /* next logic only knows opt = 1 | 2 | 3, make sure that it only gets that */
   opt &= DRAW_LINEXY;

    /* Allocate work arrays */

    utmp = (PLINT *) malloc((size_t) (2 * MAX(nx, ny) * sizeof(PLINT)));
    vtmp = (PLINT *) malloc((size_t) (2 * MAX(nx, ny) * sizeof(PLINT)));

    if ( ! utmp || ! vtmp)
       myexit("plot3dc: Out of memory.");

    plP_gw3wc(&cxx, &cxy, &cyx, &cyy, &cyz);
    init = 1;
/* Call 3d line plotter.  Each viewing quadrant 
   (perpendicular to x-y plane) must be handled separately. */ 

    if (cxx >= 0.0 && cxy <= 0.0) {
       if (opt == DRAW_LINEY) 
           plt3zz(1, ny, 1, -1, -opt, &init, x, y, z, nx, ny, utmp, vtmp,ctmp);
       else {
           for (iy = 2; iy <= ny; iy++)
              plt3zz(1, iy, 1, -1, -opt, &init, x, y, z, nx, ny, utmp, vtmp,ctmp);
       }
       if (opt == DRAW_LINEX)
           plt3zz(1, ny, 1, -1, opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       else {
           for (ix = 1; ix <= nx - 1; ix++)
              plt3zz(ix, ny, 1, -1, opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       }
    }

    else if (cxx <= 0.0 && cxy <= 0.0) {
        if (opt == DRAW_LINEX)
           plt3zz(nx, ny, -1, -1, opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       else {
           for (ix = 2; ix <= nx; ix++) 
              plt3zz(ix, ny, -1, -1, opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       }
       if (opt == DRAW_LINEY)
           plt3zz(nx, ny, -1, -1, -opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       else {
           for (iy = ny; iy >= 2; iy--)
             plt3zz(nx, iy, -1, -1, -opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       }
    }

    else if (cxx <= 0.0 && cxy >= 0.0) {
       if (opt == DRAW_LINEY) 
           plt3zz(nx, 1, -1, 1, -opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       else {
           for (iy = ny - 1; iy >= 1; iy--) 
              plt3zz(nx, iy, -1, 1, -opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       }
       if (opt == DRAW_LINEX)
           plt3zz(nx, 1, -1, 1, opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       else {
           for (ix = nx; ix >= 2; ix--)
              plt3zz(ix, 1, -1, 1, opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       }
    }

    else if (cxx >= 0.0 && cxy >= 0.0) {
       if (opt == DRAW_LINEX) 
           plt3zz(1, 1, 1, 1, opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       else {
           for (ix = nx - 1; ix >= 1; ix--) 
              plt3zz(ix, 1, 1, 1, opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       }
       if (opt == DRAW_LINEY)
           plt3zz(1, 1, 1, 1, -opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       else {
           for (iy = 1; iy <= ny - 1; iy++)
              plt3zz(1, iy, 1, 1, -opt, &init, x, y, z, nx, ny, utmp, vtmp, ctmp);
       }
    }

    /* draw contour at the base. Not 100%! Why? */
 
    if (base_cont){
      int np = NPTS, j;
      CONT_LEVEL *cont, *clev;
      CONT_LINE *cline;

      PLINT *uu = (PLINT *) malloc(NPTS*sizeof(PLINT));
      PLINT *vv = (PLINT *) malloc(NPTS*sizeof(PLINT));

      pl3upv = 0;

      /* get the contour lines */
      cont_store(x, y, z,  nx, ny, 1, nx, 1, ny, clevel, nlevel, &cont);

      /* follow the contour levels and lines */
      clev = cont;
      do { /* for each contour level */
       cline = clev->line;
       do { /* there are several lines that make up each contour */
         int cx, i, k, l, m, start, end;
         PLFLT tx, ty;
         if (cline->npts > np) {
           np = cline->npts;
           uu = (PLINT *) realloc(uu, np*sizeof(PLINT));
           vv = (PLINT *) realloc(vv, np*sizeof(PLINT));
         }

         /* the hidden line plotter plnxtv() only works OK if the x points are in increasing order.
            As this does not always happens, the situation must be detected and the line segment
            must be reversed before being plotted */

         plcol1((clev->level-fc_minz)/(fc_maxz-fc_minz));
         i = 0;
         do { 
           cx =  plP_wcpcx(plP_w3wcx(cline->x[i],cline->y[i], plsc->ranmi));
           for (j=i; j < cline->npts; j++) {  /* convert to 2D coordinates */
             uu[j] = plP_wcpcx(plP_w3wcx(cline->x[j],cline->y[j], plsc->ranmi)); 
             vv[j] = plP_wcpcy(plP_w3wcy(cline->x[j],cline->y[j], plsc->ranmi)); 
             if (uu[j] < cx) /* find turn back point */
              break;
             else
              cx = uu[j];
           }
           plnxtv(&uu[i], &vv[i], NULL, j-i, 0); /* plot line with increasing x */

           if (j < cline->npts) { /* line not yet finished, */
             start = j-1;
             for (i = start; i < cline->npts; i++) {  /* search turn forward point */
              uu[i] = plP_wcpcx(plP_w3wcx(cline->x[i],cline->y[i], plsc->ranmi));
              if (uu[i] > cx)
                break;
              else
                cx = uu[i];
             }
             end = i-1;

             for (k=0; k < (end-start+1)/2; k++) { /* reverse line segment */
              l = start+k;
              m = end-k;
              tx = cline->x[l];
              ty = cline->y[l];
              cline->x[l] = cline->x[m];
              cline->y[l] = cline->y[m];
              cline->x[m] = tx;
              cline->y[m] = ty;
             }

             /* convert to 2D coordinates */
             for (j=start; j <= end; j++) {
              uu[j] = plP_wcpcx(plP_w3wcx(cline->x[j],cline->y[j], plsc->ranmi)); 
              vv[j] = plP_wcpcy(plP_w3wcy(cline->x[j],cline->y[j], plsc->ranmi)); 
             }
             plnxtv(&uu[start], &vv[start], NULL, end-start+1, 0); /* and plot it */

             i = end+1; /* restart where it was left */
           }
         } while (j < cline->npts && i < cline->npts);
         cline = cline->next;
       }
       while(cline != NULL);
       clev = clev->next;
      }
      while(clev != NULL);

      cont_clean_store(cont); /* now release the contour memory */
      pl3upv = 1;
      free(uu);
      free(vv);
    }

/* Finish up by drawing sides, background grid (both are optional) */

    if (side)
       plside3(x, y, z, nx, ny, opt);

    if (zbflg) {
       color = plsc->icol0;
       plcol(zbcol);
       plgrid3(zbtck);
       plcol(color);
    }

    freework();

    if(clipped) {
      free(x);
      free(y);
      for(i=0; i<nx; i++)
       free(z[i]);
      free(z);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void c_plpat ( PLINT  nlin,
PLINT inc,
PLINT del 
)

Definition at line 267 of file plsdef.c.

{
    PLINT i;

    if (plsc->level < 1) {
       plabort("plpat: Please call plinit first");
       return;
    }
    if (nlin < 1 || nlin > 2) {
       plabort("plpat: Only 1 or 2 line styles allowed");
       return;
    }
    for (i = 0; i < nlin; i++) {
       if (del[i] < 0) {
           plabort("plpat: Line spacing must be greater than 0");
           return;
       }
    }
    spat(inc, del, nlin);
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plpoin ( PLINT  n,
PLFLT x,
PLFLT y,
PLINT  code 
)

Definition at line 88 of file plsym.c.

{
    PLINT i, sym, ifont = plsc->cfont;

    if (plsc->level < 3) {
       plabort("plpoin: Please set up window first");
       return;
    }
    if (code < -1 || code > 127) {
       plabort("plpoin: Invalid code");
       return;
    }

    if (code == -1) {
       for (i = 0; i < n; i++)
           pljoin(x[i], y[i], x[i], y[i]);
    }
    else {
        if (ifont > numberfonts)
           ifont = 1;
       sym = *(fntlkup + (ifont - 1) * numberchars + code);

       for (i = 0; i < n; i++)
           plhrsh(sym, plP_wcpcx(x[i]), plP_wcpcy(y[i]));
    }
}

Here is the call graph for this function:

void c_plpoin3 ( PLINT  n,
PLFLT x,
PLFLT y,
PLFLT z,
PLINT  code 
)

Definition at line 122 of file plsym.c.

{
    PLINT i, sym, ifont = plsc->cfont;
    PLFLT u, v;
    PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale;

    if (plsc->level < 3) {
       plabort("plpoin3: Please set up window first");
       return;
    }
    if (code < -1 || code > 127) {
       plabort("plpoin3: Invalid code");
       return;
    }

    plP_gdom(&xmin, &xmax, &ymin, &ymax);
    plP_grange(&zscale, &zmin, &zmax);

    if (code == -1) {
       for (i = 0; i < n; i++) {
         if(x[i] >= xmin && x[i] <= xmax &&
            y[i] >= ymin && y[i] <= ymax &&
            z[i] >= zmin && z[i] <= zmax) {
           u = plP_wcpcx(plP_w3wcx( x[i], y[i], z[i] ));
           v = plP_wcpcy(plP_w3wcy( x[i], y[i], z[i] ));
           plP_movphy(u,v);
           plP_draphy(u,v);
         }
       }
    }
    else {
        if (ifont > numberfonts)
           ifont = 1;
       sym = *(fntlkup + (ifont - 1) * numberchars + code);

       for( i=0; i < n; i++ ) {
         if(x[i] >= xmin && x[i] <= xmax &&
            y[i] >= ymin && y[i] <= ymax &&
            z[i] >= zmin && z[i] <= zmax) {
           u = plP_wcpcx(plP_w3wcx( x[i], y[i], z[i] ));
           v = plP_wcpcy(plP_w3wcy( x[i], y[i], z[i] ));
           plhrsh(sym, u, v);
         }
       }
    }
    return;
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plpoly3 ( PLINT  n,
PLFLT x,
PLFLT y,
PLFLT z,
PLINT draw,
PLINT  ifcc 
)

Definition at line 195 of file plline.c.

{
    int i;
    PLFLT vmin[3], vmax[3], zscale;
    PLFLT u1, v1, u2, v2, u3, v3;
    PLFLT c;

    if (plsc->level < 3) {
       plabort("plpoly3: Please set up window first");
       return;
    }

    if ( n < 3 ) {
       plabort("plpoly3: Must specify at least 3 points");
       return;
    }

/* Now figure out which side this is. */

    u1 = plP_wcpcx(plP_w3wcx( x[0], y[0], z[0] ));
    v1 = plP_wcpcy(plP_w3wcy( x[0], y[0], z[0] ));

    u2 = plP_wcpcx(plP_w3wcx( x[1], y[1], z[1] ));
    v2 = plP_wcpcy(plP_w3wcy( x[1], y[1], z[1] ));

    u3 = plP_wcpcx(plP_w3wcx( x[2], y[2], z[2] ));
    v3 = plP_wcpcy(plP_w3wcy( x[2], y[2], z[2] ));

    c = (u1-u2)*(v3-v2)-(v1-v2)*(u3-u2);

    if ( c *(1 - 2*ifcc) < 0. )
        return;

    /* get the bounding box in 3d */
    plP_gdom(&vmin[0], &vmax[0], &vmin[1], &vmax[1]);
    plP_grange(&zscale, &vmin[2], &vmax[2]);

    /* interate over the vertices */
    for( i=0; i < n-1; i++ ) {
      PLFLT p0[3], p1[3];
      int axis;

      /* copy the end points of the segment to allow clipping */
      p0[0] = x[i]; p0[1] = y[i]; p0[2] = z[i];
      p1[0] = x[i+1]; p1[1] = y[i+1]; p1[2] = z[i+1];

      /* check against each axis of the bounding box */
      for(axis = 0; axis < 3; axis++) {
       if(p0[axis] < vmin[axis]) { /* first out */
         if(p1[axis] < vmin[axis]) {
           break; /* both endpoints out so quit */
         } else {
           int j;
           /* interpolate to find intersection with box */
           PLFLT t = (vmin[axis] - p0[axis]) / (p1[axis] - p0[axis]);
           p0[axis] = vmin[axis];
           for(j = 1; j<3; j++) {
             int k = (axis+j)%3;
             p0[k] = (1-t)*p0[k] + t*p1[k];
           }
         }
       } else if(p1[axis] < vmin[axis]) { /* second out */
         int j;
         /* interpolate to find intersection with box */
         PLFLT t = (vmin[axis] - p0[axis]) / (p1[axis] - p0[axis]);
         p1[axis] = vmin[axis];
         for(j = 1; j<3; j++) {
           int k = (axis+j)%3;
           p1[k] = (1-t)*p0[k] + t*p1[k];
         }
       }
       if(p0[axis] > vmax[axis]) { /* first out */
         if(p1[axis] > vmax[axis]) {
           break; /* both out so quit */
         } else {
           int j;
           /* interpolate to find intersection with box */
           PLFLT t = (vmax[axis] - p0[axis]) / (p1[axis] - p0[axis]);
           p0[axis] = vmax[axis];
           for(j = 1; j<3; j++) {
             int k = (axis+j)%3;
             p0[k] = (1-t)*p0[k] + t*p1[k];
           }
         }
       } else if(p1[axis] > vmax[axis]) { /* second out */
         int j;
         /* interpolate to find intersection with box */
         PLFLT t = (vmax[axis] - p0[axis]) / (p1[axis] - p0[axis]);
         p1[axis] = vmax[axis];
         for(j = 1; j<3; j++) {
           int k = (axis+j)%3;
           p1[k] = (1-t)*p0[k] + t*p1[k];
         }
       }
      }
      /* if we made it to here without "break"ing out of the loop, the 
        remaining segment is visible */
      if( axis == 3 && draw[i] ) { /*  not clipped away */
       PLFLT u0, v0, u1, v1;
       u0 = plP_wcpcx(plP_w3wcx( p0[0], p0[1], p0[2] ));
       v0 = plP_wcpcy(plP_w3wcy( p0[0], p0[1], p0[2] ));
       u1 = plP_wcpcx(plP_w3wcx( p1[0], p1[1], p1[2] ));
       v1 = plP_wcpcy(plP_w3wcy( p1[0], p1[1], p1[2] ));
       plP_movphy(u0,v0);
       plP_draphy(u1,v1);
      }
    }
    return;
}

Here is the call graph for this function:

void c_plprec ( PLINT  setp,
PLINT  prec 
)

Definition at line 2324 of file plcore.c.

{
    plsc->setpre = setp;
    plsc->precis = prec;
}
void c_plpsty ( PLINT  patt)

Definition at line 296 of file plsdef.c.

{
    if (plsc->level < 1) {
       plabort("plpsty: Please call plinit first");
       return;
    }
    if (patt > 8) {
       plabort("plpsty: Invalid pattern");
       return;
    }
    if (patt != plsc->patt) {
       plsc->patt = patt;

       if (plsc->level > 0) {
           plP_state(PLSTATE_FILL);
       }
    }
    if (patt > 0) {
       spat(&pattern[patt - 1].inc[0], &pattern[patt - 1].del[0],
            pattern[patt - 1].nlines);
    }
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plptex ( PLFLT  x,
PLFLT  y,
PLFLT  dx,
PLFLT  dy,
PLFLT  just,
const char *  text 
)

Definition at line 520 of file plsym.c.

{
    PLINT x, y, refx, refy;
    PLFLT xdv, ydv, xmm, ymm, refxmm, refymm, shift, cc, ss;
    PLFLT xform[4], diag;
    PLFLT chrdef, chrht;
    PLFLT dispx, dispy;

    if (plsc->level < 3) {
       plabort("plptex: Please set up window first");
       return;
    }

    if (dx == 0.0 && dy == 0.0) {
       dx = 1.0;
       dy = 0.0;
    }
    cc = plsc->wmxscl * dx;
    ss = plsc->wmyscl * dy;
    diag = sqrt(cc * cc + ss * ss);
    cc /= diag;
    ss /= diag;

    xform[0] = cc;
    xform[1] = -ss;
    xform[2] = ss;
    xform[3] = cc;

    xdv = plP_wcdcx(wx);
    ydv = plP_wcdcy(wy);

    dispx = 0.;
    dispy = 0.;

/* Convert to physical units (mm) and compute shifts */

    plgchr(&chrdef, &chrht);
    shift = (just == 0.0) ? 0.0 : plstrl(text) * just;

    xmm = plP_dcmmx(xdv) + dispx * chrht;
    ymm = plP_dcmmy(ydv) + dispy * chrht;
    refxmm = xmm - shift * xform[0];
    refymm = ymm - shift * xform[2];

    x = plP_mmpcx(xmm);
    y = plP_mmpcy(ymm);
    refx = plP_mmpcx(refxmm);
    refy = plP_mmpcy(refymm);

    plP_text(0, just, xform, x, y, refx, refy, text);      
}

Here is the call graph for this function:

Definition at line 2007 of file plcore.c.

{
    if (plsc->plbufFile != NULL) {
       plRemakePlot(plsc);
    }
    else {
       plwarn("plreplot: plot buffer not available");
    }
}

Here is the call graph for this function:

void c_plrgb ( PLFLT  r,
PLFLT  g,
PLFLT  b 
)

Definition at line 739 of file plctrl.c.

{
    if (plsc->level < 1) {
       plabort("plrgb: Please call plinit first");
       return;
    }

    plsc->icol0 = PL_RGB_COLOR;
    plsc->curcolor.r = MAX(0, MIN(255, (int) (256. * r)));
    plsc->curcolor.g = MAX(0, MIN(255, (int) (256. * g)));
    plsc->curcolor.b = MAX(0, MIN(255, (int) (256. * b)));

    plsc->curcmap = 0;
    plP_state(PLSTATE_COLOR0);
}

Here is the call graph for this function:

void c_plrgb1 ( PLINT  r,
PLINT  g,
PLINT  b 
)

Definition at line 763 of file plctrl.c.

{
    if (plsc->level < 1) {
       plabort("plrgb1: Please call plinit first");
       return;
    }
    if ((r < 0 || r > 255) || (g < 0 || g > 255) || (b < 0 || b > 255)) {
       plabort("plrgb1: Invalid color");
       return;
    }

    plsc->icol0 = PL_RGB_COLOR;
    plsc->curcolor.r = r;
    plsc->curcolor.g = g;
    plsc->curcolor.b = b;

    plsc->curcmap = 0;
    plP_state(PLSTATE_COLOR0);
}

Here is the call graph for this function:

void c_plschr ( PLFLT  def,
PLFLT  scale 
)

Definition at line 185 of file plsdef.c.

{
    if (def != 0.0) 
       plsc->chrdef = def;

    plsc->chrht = scale * plsc->chrdef;
}
void c_plscmap0 ( PLINT r,
PLINT g,
PLINT b,
PLINT  ncol0 
)

Definition at line 247 of file plctrl.c.

{
    int i;

    plscmap0n(ncol0);

    for (i = 0; i < plsc->ncol0; i++) {
       if ((r[i] < 0 || r[i] > 255) ||
           (g[i] < 0 || g[i] > 255) ||
           (b[i] < 0 || b[i] > 255)) {

           char buffer[256];
           sprintf(buffer, "plscmap0: Invalid RGB color: %d, %d, %d",
                  (int) r[i], (int) g[i], (int) b[i]);
           plabort(buffer);
           return;
       }

       plsc->cmap0[i].r = r[i];
       plsc->cmap0[i].g = g[i];
       plsc->cmap0[i].b = b[i];
    }

    if (plsc->level > 0)
       plP_state(PLSTATE_CMAP0);
}

Here is the call graph for this function:

void c_plscmap0n ( PLINT  ncol0)

Definition at line 502 of file plctrl.c.

{
    int ncol, size, imin, imax;

/* No change */

    if (ncol0 > 0 && plsc->ncol0 == ncol0)
       return;

/* Handle all possible startup conditions */

    if (plsc->ncol0 <= 0 && ncol0 <= 0)
       ncol = 16;
    else if (ncol0 <= 0)
       ncol = plsc->ncol0;
    else
        ncol = ncol0;

    imax = ncol-1;
    size = ncol * sizeof(PLColor);

/* Allocate the space */

    if (plsc->cmap0 == NULL) {
       plsc->cmap0 = (PLColor *) calloc(1, size);
       imin = 0;
    }
    else {
       plsc->cmap0 = (PLColor *) realloc(plsc->cmap0, size);
       imin = plsc->ncol0;
    }

/* Fill in default entries */

    plsc->ncol0 = ncol;
    plcmap0_def(imin, imax);
}

Here is the call graph for this function:

void c_plscmap1 ( PLINT r,
PLINT g,
PLINT b,
PLINT  ncol1 
)

Definition at line 282 of file plctrl.c.

{
    int i;

    plscmap1n(ncol1);

    for (i = 0; i < plsc->ncol1; i++) {
       if ((r[i] < 0 || r[i] > 255) ||
           (g[i] < 0 || g[i] > 255) ||
           (b[i] < 0 || b[i] > 255)) {

           char buffer[256];
           sprintf(buffer, "plscmap1: Invalid RGB color: %d, %d, %d",
                  (int) r[i], (int) g[i], (int) b[i]);
           plabort(buffer);
           return;
       }
       plsc->cmap1[i].r = r[i];
       plsc->cmap1[i].g = g[i];
       plsc->cmap1[i].b = b[i];
    }

    if (plsc->level > 0)
       plP_state(PLSTATE_CMAP1);
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plscmap1l ( PLINT  itype,
PLINT  npts,
PLFLT intensity,
PLFLT coord1,
PLFLT coord2,
PLFLT coord3,
PLINT rev 
)

Definition at line 361 of file plctrl.c.

{
    int n;
    PLFLT h, l, s, r, g, b;

    if (npts < 2) {
       plabort("plscmap1l: Must specify at least two control points");
       return;
    }

    if ( (pos[0] != 0) || (pos[npts-1] != 1)) {
       plabort("plscmap1l: First, last control points must lie on boundary");
       return;
    }

    if ( npts > PL_MAX_CMAP1CP ) {
       plabort("plscmap1l: exceeded maximum number of control points");
       return;
    }

/* Allocate if not done yet */

    if (plsc->cmap1 == NULL)
       plscmap1n(0);

/* Save control points */

    plsc->ncp1 = npts;

    for (n = 0; n < npts; n++) {

       if (itype == 0) {
           h = coord1[n];
           l = coord2[n];
           s = coord3[n];
       }
       else {
           r = coord1[n];
           g = coord2[n];
           b = coord3[n];
           plRGB_HLS(r, g, b, &h, &l, &s);
       }

       plsc->cmap1cp[n].h = h;
       plsc->cmap1cp[n].l = l;
       plsc->cmap1cp[n].s = s;
       plsc->cmap1cp[n].p = pos[n];

       if (rev == NULL)
           plsc->cmap1cp[n].rev = 0;
       else
           plsc->cmap1cp[n].rev = rev[n];
    }

/* Calculate and set color map */

    plcmap1_calc();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 552 of file plctrl.c.

{
    int ncol, size;

/* No change */

    if (ncol1 > 0 && plsc->ncol1 == ncol1)
       return;

/* Handle all possible startup conditions */

    if (plsc->ncol1 <= 0 && ncol1 <= 0)
       ncol = 128;
    else if (ncol1 <= 0)
       ncol = plsc->ncol1;
    else
        ncol = ncol1;

    size = ncol * sizeof(PLColor);

/* Allocate the space */

    if (plsc->ncol1 > 0) 
       plsc->cmap1 = (PLColor *) realloc(plsc->cmap1, size);
    else 
       plsc->cmap1 = (PLColor *) calloc(ncol, sizeof(PLColor));

/* Fill in default entries */

    plsc->ncol1 = ncol;
    if (plsc->ncp1 == 0)
       plcmap1_def();
    else
       plcmap1_calc();
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plscol0 ( PLINT  icol0,
PLINT  r,
PLINT  g,
PLINT  b 
)

Definition at line 181 of file plctrl.c.

{
    if (plsc->cmap0 == NULL)
       plscmap0n(0);

    if (icol0 < 0 || icol0 >= plsc->ncol0) {
       char buffer[256];
       sprintf(buffer, "plscol0: Illegal color table value: %d", (int) icol0);
       plabort(buffer);
       return;
    }
    if ((r < 0 || r > 255) || (g < 0 || g > 255) || (b < 0 || b > 255)) {
       char buffer[256];
       sprintf(buffer, "plscol0: Invalid RGB color: %d, %d, %d",
              (int) r, (int) g, (int) b);
       plabort(buffer);
       return;
    }

    plsc->cmap0[icol0].r = r;
    plsc->cmap0[icol0].g = g;
    plsc->cmap0[icol0].b = b;

    if (plsc->level > 0)
       plP_state(PLSTATE_CMAP0);
}

Here is the call graph for this function:

Definition at line 155 of file plctrl.c.

{
    plscol0(0, r, g, b);
}
void c_plscolor ( PLINT  color)

Definition at line 725 of file plctrl.c.

{
    plsc->colorset = 1;
    plsc->color = color;
}
void c_plscompression ( PLINT  compression)

Definition at line 2663 of file plcore.c.

{
  if (plsc->level <= 0) 
     {
      plsc->dev_compression=compression;
     }
}
MZ_DLLEXPORT void c_plsdev ( const char *  devname)

Definition at line 2133 of file plcore.c.

{
    if (plsc->level > 0) {
       plwarn("plsdev: Must be called before plinit.");
       return;
    }
    if (devname != NULL) {
       strncpy(plsc->DevName, devname, sizeof(plsc->DevName) - 1);
       plsc->DevName[sizeof(plsc->DevName) - 1] = '\0';
    }
}

Here is the call graph for this function:

void c_plsdidev ( PLFLT  mar,
PLFLT  aspect,
PLFLT  jx,
PLFLT  jy 
)

Definition at line 775 of file plcore.c.

{
    plsetvar(plsc->mar, mar);
    plsetvar(plsc->aspect, aspect);
    plsetvar(plsc->jx, jx);
    plsetvar(plsc->jy, jy);

    if (mar == 0. && aspect == 0. && jx == 0. && jy == 0. && 
       ! (plsc->difilt & PLDI_ORI)) {
       plsc->difilt &= ~PLDI_DEV;
       return;
    }

    plsc->difilt |= PLDI_DEV;
    pldi_ini();
}

Here is the call graph for this function:

void c_plsdimap ( PLINT  dimxmin,
PLINT  dimxmax,
PLINT  dimymin,
PLINT  dimymax,
PLFLT  dimxpmm,
PLFLT  dimypmm 
)

Definition at line 1002 of file plcore.c.

{
    plsetvar(plsc->dimxmin, dimxmin);
    plsetvar(plsc->dimxmax, dimxmax);
    plsetvar(plsc->dimymin, dimymin);
    plsetvar(plsc->dimymax, dimymax);
    plsetvar(plsc->dimxpmm, dimxpmm);
    plsetvar(plsc->dimypmm, dimypmm);

    plsc->difilt |= PLDI_MAP;
    pldi_ini();
}

Here is the call graph for this function:

void c_plsdiori ( PLFLT  rot)

Definition at line 898 of file plcore.c.

{
    plsc->diorot = rot;
    if (rot == 0.) {
       plsc->difilt &= ~PLDI_ORI;
       pldi_ini();
       return;
    }

    plsc->difilt |= PLDI_ORI;
    pldi_ini();
}

Here is the call graph for this function:

void c_plsdiplt ( PLFLT  xmin,
PLFLT  ymin,
PLFLT  xmax,
PLFLT  ymax 
)

Definition at line 673 of file plcore.c.

{
    plsc->dipxmin = (xmin < xmax) ? xmin : xmax;
    plsc->dipxmax = (xmin < xmax) ? xmax : xmin;
    plsc->dipymin = (ymin < ymax) ? ymin : ymax;
    plsc->dipymax = (ymin < ymax) ? ymax : ymin;

    if (xmin == 0. && xmax == 1. && ymin == 0. && ymax == 1.)  {
       plsc->difilt &= ~PLDI_PLT;
       return;
    }

    plsc->difilt |= PLDI_PLT;
    pldi_ini();
}

Here is the call graph for this function:

void c_plsdiplz ( PLFLT  xmin,
PLFLT  ymin,
PLFLT  xmax,
PLFLT  ymax 
)

Definition at line 696 of file plcore.c.

{
    if (plsc->difilt & PLDI_PLT) {
       xmin = plsc->dipxmin + (plsc->dipxmax - plsc->dipxmin) * xmin;
       ymin = plsc->dipymin + (plsc->dipymax - plsc->dipymin) * ymin;
       xmax = plsc->dipxmin + (plsc->dipxmax - plsc->dipxmin) * xmax;
       ymax = plsc->dipymin + (plsc->dipymax - plsc->dipymin) * ymax;
    }

    plsdiplt(xmin, ymin, xmax, ymax);
}
void c_plsesc ( char  esc)

Definition at line 2348 of file plcore.c.

{
    switch (esc) {
       case '!':            /* ASCII 33 */
       case '#':            /* ASCII 35 */
       case '$':            /* ASCII 36 */
       case '%':            /* ASCII 37 */
       case '&':            /* ASCII 38 */
       case '*':            /* ASCII 42 */
       case '@':            /* ASCII 64 */
       case '^':            /* ASCII 94 */
       case '~':            /* ASCII 126 */
       plsc->esc = esc;
       break;

      default:
       plwarn("plsesc: Invalid escape character, ignoring.");
    }
}

Here is the call graph for this function:

int c_plsetopt ( char *  opt,
char *  optarg 
)

Definition at line 661 of file plargs.c.

{
    return(plSetOpt(opt, optarg));
}

Here is the call graph for this function:

void c_plsfam ( PLINT  fam,
PLINT  num,
PLINT  bmax 
)

Definition at line 2418 of file plcore.c.

{
    if (plsc->level > 0)
       plwarn("plsfam: Must be called before plinit.");

    if (fam >= 0)
       plsc->family = fam;
    if (num >= 0)
       plsc->member = num;
    if (bmax >= 0)
       plsc->bytemax = bmax;
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plsfnam ( const char *  fnam)

Definition at line 2308 of file plcore.c.

{
    plP_sfnam(plsc, fnam);
}

Here is the call graph for this function:

void c_plshade ( PLFLT **  a,
PLINT  nx,
PLINT  ny,
PLINT(*)(PLFLT, PLFLT defined,
PLFLT  left,
PLFLT  right,
PLFLT  bottom,
PLFLT  top,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLINT  sh_width,
PLINT  min_color,
PLINT  min_width,
PLINT  max_color,
PLINT  max_width,
void(*)(PLINT, PLFLT *, PLFLT *)  fill,
PLINT  rectangular,
void(*)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer pltr,
PLPointer  pltr_data 
)

Definition at line 238 of file plshade.c.

{
    PLfGrid2 grid;

    grid.f = a;
    grid.nx = nx;
    grid.ny = ny;

    plshade_int( plf2eval2, (PLPointer) &grid,
                 NULL, NULL,
/*          plc2eval, (PLPointer) &cgrid,*/
                 defined, MISSING_MIN_DEF, MISSING_MAX_DEF, nx, ny, xmin, 
                 xmax, ymin, ymax, shade_min, shade_max,
                 sh_cmap, sh_color, sh_width,
                 min_color, min_width, max_color, max_width,
                 fill, rectangular, pltr, pltr_data );
}

Here is the call graph for this function:

MZ_DLLEXPORT void c_plshades ( PLFLT **  a,
PLINT  nx,
PLINT  ny,
PLINT(*)(PLFLT, PLFLT defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT clevel,
PLINT  nlevel,
PLINT  fill_width,
PLINT  cont_color,
PLINT  cont_width,
void(*)(PLINT, PLFLT *, PLFLT *)  fill,
PLINT  rectangular,
void(*)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer pltr,
PLPointer  pltr_data 
)

Definition at line 192 of file plshade.c.

{
   PLFLT shade_min, shade_max, shade_color;
   PLINT i, init_color, init_width;

   for (i = 0; i < nlevel-1; i++) {
      shade_min = clevel[i];
      shade_max = clevel[i+1];
      shade_color = i / (PLFLT) (nlevel-2);
      /* The constants in order mean 
       * (1) color map1,
       * (0, 0, 0, 0) all edge effects will be done with plcont rather
       * than the normal plshade drawing which gets partially blocked
       * when sequential shading is done as in the present case */
      
      plshade(a, nx, ny, defined, xmin, xmax, ymin, ymax,
             shade_min, shade_max,
             1, shade_color, fill_width,
             0, 0, 0, 0,
             fill, rectangular, pltr, pltr_data);
   }
   if(cont_color > 0 && cont_width > 0) {
      init_color = plsc->icol0;
      init_width = plsc->width;
      plcol0(cont_color);
      plwid(cont_width);
      plcont(a, nx, ny, 1, nx, 1, ny, clevel, nlevel, pltr, pltr_data);
      plcol0(init_color);
      plwid(init_width);
   }
}
void c_plsmaj ( PLFLT  def,
PLFLT  scale 
)

Definition at line 215 of file plsdef.c.

{
    if (def != 0.0) 
       plsc->majdef = def;

    plsc->majht = scale * plsc->majdef;
}
void c_plsmem ( PLINT  maxx,
PLINT  maxy,
void plotmem 
)

Definition at line 2164 of file plcore.c.

{
    plsc->dev = plotmem;
    plP_setphy (0, maxx, 0, maxy);
}

Here is the call graph for this function:

void c_plsmin ( PLFLT  def,
PLFLT  scale 
)

Definition at line 200 of file plsdef.c.

{
    if (def != 0.0) 
       plsc->mindef = def;

    plsc->minht = scale * plsc->mindef;
}
void c_plsori ( PLINT  ori)

Definition at line 2245 of file plcore.c.

{
    plsdiori((PLFLT) ori);
}
MZ_DLLEXPORT void c_plspage ( PLFLT  xp,
PLFLT  yp,
PLINT  xleng,
PLINT  yleng,
PLINT  xoff,
PLINT  yoff 
)

Definition at line 2090 of file plcore.c.

{
    if (xp)
       plsc->xdpi = xp;
    if (yp)
       plsc->ydpi = yp;

    if (xleng)
       plsc->xlength = xleng;
    if (yleng)
       plsc->ylength = yleng;

    if (xoff)
       plsc->xoffset = xoff;
    if (yoff)
       plsc->yoffset = yoff;

    plsc->pageset = 1;
}
void c_plspause ( PLINT  pause)

Definition at line 2316 of file plcore.c.

{
    plsc->nopause = ! pause;
}
void c_plsstrm ( PLINT  strm)

Definition at line 1342 of file plcore.c.

{
    if (strm < 0 || strm >= PL_NSTREAMS) {
       fprintf(stderr,
              "plsstrm: Illegal stream number %d, must be in [0, %d]\n",
              (int) strm, PL_NSTREAMS);
    }
    else {
       ipls = strm;
       if (pls[ipls] == NULL) {
           pls[ipls] = (PLStream *) malloc((size_t) sizeof(PLStream));
           if (pls[ipls] == NULL)
              plexit("plsstrm: Out of memory.");

           memset((char *) pls[ipls], 0, sizeof(PLStream));
       }
       plsc = pls[ipls];
       plsc->ipls = ipls;
    }
}

Here is the call graph for this function:

void c_plssub ( PLINT  nx,
PLINT  ny 
)

Definition at line 2113 of file plcore.c.

{
    if (nx > 0)
       plsc->nsubx = nx;
    if (ny > 0)
       plsc->nsuby = ny;

/* Force a page advance */

    if (plsc->level > 0) {
        plP_subpInit();
/*AWI  plP_eop();
       plP_bop();*/
    }
}

Here is the call graph for this function:

void c_plssym ( PLFLT  def,
PLFLT  scale 
)

Definition at line 230 of file plsdef.c.

{
    if (def != 0.0) 
       plsc->symdef = def;

    plsc->symht = scale * plsc->symdef;
}
void c_plstar ( PLINT  nx,
PLINT  ny 
)

Definition at line 1119 of file plcore.c.

{
    pllib_init();

    if (plsc->level != 0)
       plend1();

    plssub(nx, ny);

    c_plinit();
}

Here is the call graph for this function:

void c_plstart ( const char *  devname,
PLINT  nx,
PLINT  ny 
)

Definition at line 1138 of file plcore.c.

{
    pllib_init();

    if (plsc->level != 0)
       plend1();

    plssub(nx, ny);
    plsdev(devname);

    c_plinit();
}

Here is the call graph for this function:

void c_plstripa ( PLINT  id,
PLINT  pen,
PLFLT  x,
PLFLT  y 
)

Definition at line 201 of file plstripc.c.

{
    int j, yasc=0, istart;

    if (p >= PEN) {
       plabort("Non existent pen");
       return;
    }

    if ((id < 0) || (id >= MAX_STRIPC) || 
       ((stripc = strip[id]) == NULL)) {
       plabort("Non existent stripchart");
       return;
    }

/* Add new point, allocating memory if necessary */

    if (++stripc->npts[p] > stripc->nptsmax[p]) {
       stripc->nptsmax[p] += 32;
       stripc->x[p] = (PLFLT *) realloc((void *) stripc->x[p], sizeof(PLFLT)*stripc->nptsmax[p]);
       stripc->y[p] = (PLFLT *) realloc((void *) stripc->y[p], sizeof(PLFLT)*stripc->nptsmax[p]);
       if (stripc->x[p] == NULL || stripc->y[p] == NULL) {
           plabort("plstripc: Out of memory.");
           plstripd(id);
           return;
       }
    }
    
    stripc->x[p][stripc->npts[p]-1] = x;
    stripc->y[p][stripc->npts[p]-1] = y;

    stripc->xmax = x;
           
    if (stripc->y_ascl == 1 && (y > stripc->ymax || y < stripc->ymin))
       yasc=1;

    if (y > stripc->ymax)
       stripc->ymax = stripc->ymin + 1.1*(y - stripc->ymin);
       if (y < stripc->ymin)
         stripc->ymin = stripc->ymax - 1.1*(stripc->ymax - y);

/* Now either plot new point or regenerate plot */

        if (stripc->xmax - stripc->xmin < stripc->xlen) {
            if( yasc == 0) {

            /* If user has changed subwindow, make shure we have the correct one */
                plvsta();
                plwind(stripc->wxmin, stripc->wxmax, stripc->wymin, stripc->wymax); /* FIXME - can exist some redundancy here */
              plcol(stripc->colline[p]); pllsty(stripc->styline[p]);
              if ((stripc->npts[p]-2) < 0)
                plP_movwor(stripc->x[p][stripc->npts[p]-1], stripc->y[p][stripc->npts[p]-1]);
              else
                plP_movwor(stripc->x[p][stripc->npts[p]-2], stripc->y[p][stripc->npts[p]-2]);
              plP_drawor(stripc->x[p][stripc->npts[p]-1], stripc->y[p][stripc->npts[p]-1]);
              plflush();
            }
            else {
              stripc->xmax = stripc->xmin + stripc->xlen;
                plstrip_gen(stripc);
           }
       }
    else {
/* Regenerating plot */
       if (stripc->acc == 0) {
           for (j=0; j<PEN; j++) {
              if (stripc->npts[j] > 0) {
                  istart = 0;
                  while (stripc->x[j][istart] < stripc->xmin + stripc->xlen*stripc->xjump)
                     istart++;
                     
                  stripc->npts[j] = stripc->npts[j] - istart;
                  memcpy( &stripc->x[j][0], &stripc->x[j][istart], (stripc->npts[j])*sizeof(PLFLT));
                  memcpy( &stripc->y[j][0], &stripc->y[j][istart], (stripc->npts[j])*sizeof(PLFLT));
              }
           }
       } else
           stripc->xlen = stripc->xlen * (1 + stripc->xjump);

       stripc->xmin = stripc->x[p][0];
       stripc->xmax = stripc->xmax + stripc->xlen*stripc->xjump;

       plstrip_gen(stripc);
    }
}

Here is the call graph for this function:

void c_plstripc ( PLINT id,
char *  xspec,
char *  yspec,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  xjump,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  xlpos,
PLFLT  ylpos,
PLINT  y_ascl,
PLINT  acc,
PLINT  colbox,
PLINT  collab,
PLINT  colline[],
PLINT  styline[],
char *  legline[],
char *  labx,
char *  laby,
char *  labtop 
)

Definition at line 293 of file plstripc.c.

{
    int i;

    if ((id < 0) || (id >= MAX_STRIPC) || 
       ((stripc = strip[id]) == NULL)) {
       plabort("Non existent stripchart");
       return;
    }

    for (i=0; i<PEN; i++) {
       if (stripc->npts[i]) {
            free((void *) stripc->x[i]);
            free((void *) stripc->y[i]);
            free(stripc->legline[i]);
        }
    }

    free(stripc->xspec);
    free(stripc->yspec);
    free(stripc->labx);
    free(stripc->laby);
    free(stripc->labtop);    
    free((void *) stripc);
    strip[id] = NULL;
}

Here is the call graph for this function:

void c_plstyl ( PLINT  nms,
PLINT mark,
PLINT space 
)

Definition at line 313 of file plline.c.

{
    short int i;

    if (plsc->level < 1) {
       plabort("plstyl: Please call plinit first");
       return;
    }
    if ((nms < 0) || (nms > 10)) {
       plabort("plstyl: Broken lines cannot have <0 or >10 elements");
       return;
    }
    for (i = 0; i < nms; i++) {
       if ((mark[i] < 0) || (space[i] < 0)) {
           plabort("plstyl: Mark and space lengths must be > 0");
           return;
       }
    }

    plsc->nms = nms;
    for (i = 0; i < nms; i++) {
       plsc->mark[i] = mark[i];
       plsc->space[i] = space[i];
    }

    plsc->curel = 0;
    plsc->pendn = 1;
    plsc->timecnt = 0;
    plsc->alarm = nms > 0 ? mark[0] : 0;
}

Here is the call graph for this function:

void c_plsurf3d ( PLFLT x,
PLFLT y,
PLFLT **  z,
PLINT  nx,
PLINT  ny,
PLINT  opt,
PLFLT clevel,
PLINT  nlevel 
)
void c_plsvpa ( PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax 
)

Definition at line 408 of file plvpor.c.

{
    PLFLT sxmin, symin;

    if (plsc->level < 1) {
       plabort("plsvpa: Please call plinit first");
       return;
    }
    if ((xmin >= xmax) || (ymin >= ymax)) {
       plabort("plsvpa: Invalid limits");
       return;
    }
    if ((plsc->cursub <= 0) || (plsc->cursub > (plsc->nsubx * plsc->nsuby))) {
       plabort("plsvpa: Please call pladv or plenv to go to a subpage");
       return;
    }

    sxmin = plP_dcmmx(plsc->spdxmi);
    symin = plP_dcmmy(plsc->spdymi);

    plsc->vpdxmi = plP_mmdcx((PLFLT) (sxmin + xmin));
    plsc->vpdxma = plP_mmdcx((PLFLT) (sxmin + xmax));
    plsc->vpdymi = plP_mmdcy((PLFLT) (symin + ymin));
    plsc->vpdyma = plP_mmdcy((PLFLT) (symin + ymax));

    plsc->vppxmi = plP_dcpcx(plsc->vpdxmi);
    plsc->vppxma = plP_dcpcx(plsc->vpdxma);
    plsc->vppymi = plP_dcpcy(plsc->vpdymi);
    plsc->vppyma = plP_dcpcy(plsc->vpdyma);

    plsc->clpxmi = plP_dcpcx(plsc->vpdxmi);
    plsc->clpxma = plP_dcpcx(plsc->vpdxma);
    plsc->clpymi = plP_dcpcy(plsc->vpdymi);
    plsc->clpyma = plP_dcpcy(plsc->vpdyma);

    plsc->level = 2;
}

Here is the call graph for this function:

void c_plsxax ( PLINT  digmax,
PLINT  digits 
)

Definition at line 2456 of file plcore.c.

{
    plsc->xdigmax = digmax;
    plsc->xdigits = digits;
}
void c_plsyax ( PLINT  digmax,
PLINT  digits 
)

Definition at line 2474 of file plcore.c.

{
    plsc->ydigmax = digmax;
    plsc->ydigits = digits;
}
void c_plsym ( PLINT  n,
PLFLT x,
PLFLT y,
PLINT  code 
)

Definition at line 56 of file plsym.c.

{
    PLINT i;

    if (plsc->level < 3) {
       plabort("plsym: Please set up window first");
       return;
    }
    if (code < 0) {
       plabort("plsym: Invalid code");
       return;
    }

    for (i = 0; i < n; i++)
       plhrsh(code, plP_wcpcx(x[i]), plP_wcpcy(y[i]));
}

Here is the call graph for this function:

void c_plszax ( PLINT  digmax,
PLINT  digits 
)

Definition at line 2492 of file plcore.c.

{
    plsc->zdigmax = digmax;
    plsc->zdigits = digits;
}

Definition at line 1065 of file plctrl.c.

{
    if (plsc->level > 0)
       plP_esc(PLESC_TEXT, NULL);
}

Here is the call graph for this function:

void c_plvasp ( PLFLT  aspect)

Definition at line 359 of file plvpor.c.

{
    PLFLT spxmin, spxmax, spymin, spymax;
    PLFLT vpxmin, vpxmax, vpymin, vpymax;
    PLFLT xsize, ysize, nxsize, nysize;
    PLFLT lb, rb, tb, bb;

    if (plsc->level < 1) {
       plabort("plvasp: Please call plinit first");
       return;
    }

    lb = 8.0 * plsc->chrht;
    rb = 5.0 * plsc->chrht;
    tb = 5.0 * plsc->chrht;
    bb = 5.0 * plsc->chrht;

    plgspa(&spxmin, &spxmax, &spymin, &spymax);
    xsize = spxmax - spxmin;
    ysize = spymax - spymin;
    xsize -= lb + rb;              /* adjust for labels */
    ysize -= bb + tb;
    if (aspect * xsize > ysize) {
       nxsize = ysize / aspect;
       nysize = ysize;
    }
    else {
       nxsize = xsize;
       nysize = xsize * aspect;
    }

/* center plot within page */

    vpxmin = .5 * (xsize - nxsize) + lb;
    vpxmax = vpxmin + nxsize;
    vpymin = .5 * (ysize - nysize) + bb;
    vpymax = vpymin + nysize;

    plsvpa(vpxmin, vpxmax, vpymin, vpymax);
}

Here is the call graph for this function:

void c_plvpas ( PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  aspect 
)

Definition at line 295 of file plvpor.c.

{
    PLFLT vpxmi, vpxma, vpymi, vpyma;
    PLFLT vpxmid, vpymid, vpxlen, vpylen, w_aspect, ratio;

    if (plsc->level < 1) {
       plabort("plvpas: Please call plinit first");
       return;
    }
    if ((xmin >= xmax) || (ymin >= ymax)) {
       plabort("plvpas: Invalid limits");
       return;
    }

    if (aspect <= 0.0) {
       c_plvpor(xmin, xmax, ymin, ymax);
       return;
    }

    vpxmi = plP_dcmmx(xmin);
    vpxma = plP_dcmmx(xmax);
    vpymi = plP_dcmmy(ymin);
    vpyma = plP_dcmmy(ymax);

    vpxmid = (vpxmi + vpxma) / 2.;
    vpymid = (vpymi + vpyma) / 2.;

    vpxlen = vpxma - vpxmi;
    vpylen = vpyma - vpymi;

    w_aspect = vpylen / vpxlen;
    ratio = aspect / w_aspect;

/*
 * If ratio < 1, you are requesting an aspect ratio (y/x) less than the natural
 * aspect ratio of the specified window, and you will need to reduce the length
 * in y correspondingly.  Similarly, for ratio > 1, x length must be reduced.
 */

    if (ratio <= 0.) {
       plabort("plvpas: Error in aspect ratio setting");
       return;
    }
    else if (ratio < 1.)
       vpylen = vpylen * ratio;
    else
       vpxlen = vpxlen / ratio;

    vpxmi = vpxmid - vpxlen / 2.;
    vpxma = vpxmid + vpxlen / 2.;
    vpymi = vpymid - vpylen / 2.;
    vpyma = vpymid + vpylen / 2.;

    plsvpa(vpxmi, vpxma, vpymi, vpyma);
}

Here is the call graph for this function:

void c_plvpor ( PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax 
)

Definition at line 254 of file plvpor.c.

{
    if (plsc->level < 1) {
       plabort("plvpor: Please call plinit first");
       return;
    }
    if ((xmin >= xmax) || (ymin >= ymax)) {
       plabort("plvpor: Invalid limits");
       return;
    }
    if ((plsc->cursub <= 0) || (plsc->cursub > (plsc->nsubx * plsc->nsuby))) {
       plabort("plvpor: Please call pladv or plenv to go to a subpage");
       return;
    }

    plsc->vpdxmi = plsc->spdxmi + (plsc->spdxma - plsc->spdxmi) * xmin;
    plsc->vpdxma = plsc->spdxmi + (plsc->spdxma - plsc->spdxmi) * xmax;
    plsc->vpdymi = plsc->spdymi + (plsc->spdyma - plsc->spdymi) * ymin;
    plsc->vpdyma = plsc->spdymi + (plsc->spdyma - plsc->spdymi) * ymax;

    plsc->vppxmi = plP_dcpcx(plsc->vpdxmi);
    plsc->vppxma = plP_dcpcx(plsc->vpdxma);
    plsc->vppymi = plP_dcpcy(plsc->vpdymi);
    plsc->