Defines | Functions | Variables

plctrl.c File Reference

#include "plplotP.h"
#include "mt19937ar.h"

Go to the source code of this file.

Defines

#define DEBUG
#define NEED_PLDEBUG
#define BUFFER_SIZE   256
#define COLLEN   30
#define PALLEN   160
#define MSGLEN   1024
#define FUZZ_EPSILON   1.e-4
#define PLLIBDEV   "/usr/local/plplot/lib"
#define color_def(i, r, g, b, a, n)   if ( i >= imin && i <= imax ) color_set( i, r, g, b, a, n );
#define fuzzy_range_check(value, min, max, fuzz, err_number)
#define MAX_NUM_TRIES   10

Functions

static void color_set (PLINT i, U_CHAR r, U_CHAR g, U_CHAR b, PLFLT a, char *name)
static void strcat_delim (char *dirspec)
static void plcmap0_def (int imin, int imax)
static void plcmap1_def (void)
static PLFLT value (double n1, double n2, double hue)
static char * read_line (char *buffer, int length, FILE *fp)
static void cmap0_palette_read (const char *filename, int *number_colors, int **r, int **g, int **b, double **a)
void c_plcol0 (PLINT icol0)
void c_plcol1 (PLFLT col1)
void c_plscolbg (PLINT r, PLINT g, PLINT b)
void c_plscolbga (PLINT r, PLINT g, PLINT b, PLFLT a)
void c_plgcolbg (PLINT *r, PLINT *g, PLINT *b)
void c_plgcolbga (PLINT *r, PLINT *g, PLINT *b, PLFLT *a)
void c_plscol0 (PLINT icol0, PLINT r, PLINT g, PLINT b)
void c_plscol0a (PLINT icol0, PLINT r, PLINT g, PLINT b, PLFLT a)
void c_plgcol0 (PLINT icol0, PLINT *r, PLINT *g, PLINT *b)
void c_plgcol0a (PLINT icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a)
void c_plscmap0 (const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol0)
void c_plscmap0a (const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *a, PLINT ncol0)
void c_plscmap1 (const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol1)
void c_plscmap1a (const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *a, PLINT ncol1)
void c_plscmap1l (PLINT itype, PLINT npts, const PLFLT *pos, const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLINT *rev)
void c_plscmap1la (PLINT itype, PLINT npts, const PLFLT *pos, const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a, const PLINT *rev)
void plcmap1_calc (void)
void c_plscmap1_range (PLFLT min_color, PLFLT max_color)
void c_plgcmap1_range (PLFLT *min_color, PLFLT *max_color)
void c_plscmap0n (PLINT ncol0)
void c_plscmap1n (PLINT ncol1)
void c_plscolor (PLINT color)
void c_plhlsrgb (PLFLT h, PLFLT l, PLFLT s, PLFLT *p_r, PLFLT *p_g, PLFLT *p_b)
void c_plrgbhls (PLFLT r, PLFLT g, PLFLT b, PLFLT *p_h, PLFLT *p_l, PLFLT *p_s)
void c_plspal0 (const char *filename)
void c_plspal1 (const char *filename, PLBOOL interpolate)
void plwarn (const char *errormsg)
void plabort (const char *errormsg)
void plsabort (void(*handler)(const char *))
void plexit (const char *errormsg)
void plsexit (int(*handler)(const char *))
void c_plgra (void)
void c_plxormod (PLINT mode, PLINT *status)
void c_plsdrawmode (PLINT mode)
PLINT c_plgdrawmode ()
void c_pltext (void)
void pl_cmd (PLINT op, void *ptr)
char * plFindCommand (const char *fn)
FILE * plLibOpen (const char *fn)
PDFstrmplLibOpenPdfstrm (const char *fn)
int plFindName (char *p)
void plGetName (const char *dir, const char *subdir, const char *filename, char **filespec)
void plcol_interp (PLStream *pls, PLColor *newcolor, int i, int ncol)
void plOpenFile (PLStream *pls)
void plCloseFile (PLStream *pls)
void plP_getmember (PLStream *pls)
void plP_sfnam (PLStream *pls, const char *fnam)
void plFamInit (PLStream *pls)
void plGetFam (PLStream *pls)
void plRotPhy (PLINT orient, PLINT xmin, PLINT ymin, PLINT xmax, PLINT ymax, PLINT *px, PLINT *py)
PLDevplAllocDev (PLStream *pls)
void plGinInit (PLGraphicsIn *gin)
PLINT plGetInt (const char *s)
PLFLT plGetFlt (const char *s)
char PLDLLIMPEXP * plstrdup (const char *src)
int plsnprintf (char *buffer, int n, const char *format,...)
int plsnscanf (const char *buffer, int n, const char *format,...)
void c_plseed (unsigned int s)
PLFLT c_plrandd (void)
char * plsave_set_locale (void)
void plrestore_locale (char *saved_lc_numeric_locale)

Variables

char PLDLLIMPEXP * plplotLibDir = 0
static int(* exit_handler )(const char *errormsg)
static void(* abort_handler )(const char *errormsg)

Define Documentation

#define BUFFER_SIZE   256

Definition at line 58 of file plctrl.c.

#define COLLEN   30

Definition at line 59 of file plctrl.c.

#define color_def (   i,
  r,
  g,
  b,
  a,
  n 
)    if ( i >= imin && i <= imax ) color_set( i, r, g, b, a, n );

Definition at line 917 of file plctrl.c.

#define DEBUG

Definition at line 31 of file plctrl.c.

#define FUZZ_EPSILON   1.e-4

Definition at line 65 of file plctrl.c.

#define fuzzy_range_check (   value,
  min,
  max,
  fuzz,
  err_number 
)
Value:
if ( value < ( min - fuzz ) || value > ( max + fuzz ) ) {                                                                         \
        snprintf( msgbuf, MSGLEN, "Unrecognized cmap1 format data line.  Error number is %d. Line is %s\n", err_number, color_info ); \
        plwarn( msgbuf );                                                                                                             \
        err = 1;                                                                                                                      \
        break;                                                                                                                        \
    } else if ( value < min ) {                                                                                                       \
        value = min;                                                                                                                  \
    } else if ( value > max ) {                                                                                                       \
        value = max;                                                                                                                  \
    }

Definition at line 1455 of file plctrl.c.

#define MAX_NUM_TRIES   10

Definition at line 2356 of file plctrl.c.

#define MSGLEN   1024

Definition at line 61 of file plctrl.c.

#define NEED_PLDEBUG

Definition at line 33 of file plctrl.c.

#define PALLEN   160

Definition at line 60 of file plctrl.c.

#define PLLIBDEV   "/usr/local/plplot/lib"

Definition at line 117 of file plctrl.c.


Function Documentation

void c_plcol0 ( PLINT  icol0  ) 

Definition at line 133 of file plctrl.c.

void c_plcol1 ( PLFLT  col1  ) 

Definition at line 165 of file plctrl.c.

void c_plgcmap1_range ( PLFLT min_color,
PLFLT max_color 
)

Get the color map 1 value range used in continuous color plots.

Parameters:
min_color Specifies the minimum color used.
max_color Specifies the maximum color used.

Definition at line 835 of file plctrl.c.

void c_plgcol0 ( PLINT  icol0,
PLINT r,
PLINT g,
PLINT b 
)

Definition at line 319 of file plctrl.c.

void c_plgcol0a ( PLINT  icol0,
PLINT r,
PLINT g,
PLINT b,
PLFLT a 
)

Definition at line 351 of file plctrl.c.

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

Definition at line 226 of file plctrl.c.

void c_plgcolbga ( PLINT r,
PLINT g,
PLINT b,
PLFLT a 
)

Definition at line 238 of file plctrl.c.

PLINT c_plgdrawmode (  ) 

Get drawing mode (depends on device support!)

Returns:
Current drawing mode

Definition at line 1911 of file plctrl.c.

void c_plgra ( void   ) 

Definition at line 1851 of file plctrl.c.

void c_plhlsrgb ( PLFLT  h,
PLFLT  l,
PLFLT  s,
PLFLT p_r,
PLFLT p_g,
PLFLT p_b 
)

Definition at line 1148 of file plctrl.c.

PLFLT c_plrandd ( void   ) 

Definition at line 2814 of file plctrl.c.

void c_plrgbhls ( PLFLT  r,
PLFLT  g,
PLFLT  b,
PLFLT p_h,
PLFLT p_l,
PLFLT p_s 
)

Definition at line 1176 of file plctrl.c.

void c_plscmap0 ( const PLINT r,
const PLINT g,
const PLINT b,
PLINT  ncol0 
)

Definition at line 385 of file plctrl.c.

void c_plscmap0a ( const PLINT r,
const PLINT g,
const PLINT b,
const PLFLT a,
PLINT  ncol0 
)

Definition at line 422 of file plctrl.c.

void c_plscmap0n ( PLINT  ncol0  ) 

Definition at line 852 of file plctrl.c.

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

Definition at line 460 of file plctrl.c.

void c_plscmap1_range ( PLFLT  min_color,
PLFLT  max_color 
)

Set the color map 1 value range to use in continuous color plots.

Parameters:
min_color Specifies the minimum color to use. A value of 0.0 or less indicates that the range should start at the lowest color map 1 value available.
max_color Specifies the maximum color to use. A value of 1.0 or greater indicates that the range should exten to the highest color map 1 value available.

If min_color > max_color or min_color is greater than 1.0 or max_color is less than 0.0 then no change is made.

Definition at line 806 of file plctrl.c.

void c_plscmap1a ( const PLINT r,
const PLINT g,
const PLINT b,
const PLFLT a,
PLINT  ncol1 
)

Definition at line 496 of file plctrl.c.

void c_plscmap1l ( PLINT  itype,
PLINT  npts,
const PLFLT pos,
const PLFLT coord1,
const PLFLT coord2,
const PLFLT coord3,
const PLINT rev 
)

Definition at line 577 of file plctrl.c.

void c_plscmap1la ( PLINT  itype,
PLINT  npts,
const PLFLT pos,
const PLFLT coord1,
const PLFLT coord2,
const PLFLT coord3,
const PLFLT a,
const PLINT rev 
)

Definition at line 651 of file plctrl.c.

void c_plscmap1n ( PLINT  ncol1  ) 

Definition at line 967 of file plctrl.c.

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

Definition at line 251 of file plctrl.c.

void c_plscol0a ( PLINT  icol0,
PLINT  r,
PLINT  g,
PLINT  b,
PLFLT  a 
)

Definition at line 282 of file plctrl.c.

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

Definition at line 202 of file plctrl.c.

void c_plscolbga ( PLINT  r,
PLINT  g,
PLINT  b,
PLFLT  a 
)

Definition at line 214 of file plctrl.c.

void c_plscolor ( PLINT  color  ) 

Definition at line 1099 of file plctrl.c.

void c_plsdrawmode ( PLINT  mode  ) 

Set drawing mode (depends on device support!)

Parameters:
mode This determines which drawing mode to use.

Definition at line 1888 of file plctrl.c.

void c_plseed ( unsigned int  s  ) 

Definition at line 2802 of file plctrl.c.

void c_plspal0 ( const char *  filename  ) 

Definition at line 1427 of file plctrl.c.

void c_plspal1 ( const char *  filename,
PLBOOL  interpolate 
)

Definition at line 1474 of file plctrl.c.

void c_pltext ( void   ) 

Definition at line 1940 of file plctrl.c.

void c_plxormod ( PLINT  mode,
PLINT status 
)

Definition at line 1858 of file plctrl.c.

void cmap0_palette_read ( const char *  filename,
int *  number_colors,
int **  r,
int **  g,
int **  b,
double **  a 
) [static]

Definition at line 1280 of file plctrl.c.

void color_set ( PLINT  i,
U_CHAR  r,
U_CHAR  g,
U_CHAR  b,
PLFLT  a,
char *  name 
) [static]

Definition at line 908 of file plctrl.c.

void pl_cmd ( PLINT  op,
void *  ptr 
)

Definition at line 1955 of file plctrl.c.

void plabort ( const char *  errormsg  ) 

Definition at line 1750 of file plctrl.c.

PLDev* plAllocDev ( PLStream pls  ) 

Definition at line 2630 of file plctrl.c.

void plCloseFile ( PLStream pls  ) 

Definition at line 2420 of file plctrl.c.

void plcmap0_def ( int  imin,
int  imax 
) [static]

Definition at line 928 of file plctrl.c.

void plcmap1_calc ( void   ) 

Definition at line 725 of file plctrl.c.

void plcmap1_def ( void   )  [static]

Definition at line 1027 of file plctrl.c.

void plcol_interp ( PLStream pls,
PLColor newcolor,
int  i,
int  ncol 
)

Definition at line 2319 of file plctrl.c.

void plexit ( const char *  errormsg  ) 

Definition at line 1809 of file plctrl.c.

void plFamInit ( PLStream pls  ) 

Definition at line 2529 of file plctrl.c.

char* plFindCommand ( const char *  fn  ) 

Definition at line 1978 of file plctrl.c.

int plFindName ( char *  p  ) 

Definition at line 2242 of file plctrl.c.

void plGetFam ( PLStream pls  ) 

Definition at line 2556 of file plctrl.c.

PLFLT plGetFlt ( const char *  s  ) 

Definition at line 2699 of file plctrl.c.

PLINT plGetInt ( const char *  s  ) 

Definition at line 2668 of file plctrl.c.

void plGetName ( const char *  dir,
const char *  subdir,
const char *  filename,
char **  filespec 
)

Definition at line 2258 of file plctrl.c.

void plGinInit ( PLGraphicsIn gin  ) 

Definition at line 2649 of file plctrl.c.

FILE* plLibOpen ( const char *  fn  ) 

Definition at line 2057 of file plctrl.c.

PDFstrm* plLibOpenPdfstrm ( const char *  fn  ) 

Definition at line 2076 of file plctrl.c.

void plOpenFile ( PLStream pls  ) 

Definition at line 2358 of file plctrl.c.

void plP_getmember ( PLStream pls  ) 

Definition at line 2440 of file plctrl.c.

void plP_sfnam ( PLStream pls,
const char *  fnam 
)

Definition at line 2480 of file plctrl.c.

void plrestore_locale ( char *  saved_lc_numeric_locale  ) 

Definition at line 2874 of file plctrl.c.

void plRotPhy ( PLINT  orient,
PLINT  xmin,
PLINT  ymin,
PLINT  xmax,
PLINT  ymax,
PLINT px,
PLINT py 
)

Definition at line 2592 of file plctrl.c.

void plsabort ( void(*)(const char *)  handler  ) 

Definition at line 1791 of file plctrl.c.

char* plsave_set_locale ( void   ) 

Definition at line 2832 of file plctrl.c.

void plsexit ( int(*)(const char *)  handler  ) 

Definition at line 1835 of file plctrl.c.

int plsnprintf ( char *  buffer,
int  n,
const char *  format,
  ... 
)

Definition at line 2756 of file plctrl.c.

int plsnscanf ( const char *  buffer,
int  n,
const char *  format,
  ... 
)

Definition at line 2781 of file plctrl.c.

char PLDLLIMPEXP* plstrdup ( const char *  src  ) 

Definition at line 2735 of file plctrl.c.

void plwarn ( const char *  errormsg  ) 

Definition at line 1720 of file plctrl.c.

static char * read_line ( char *  buffer,
int  length,
FILE *  fp 
) [static]

Definition at line 1229 of file plctrl.c.

void strcat_delim ( char *  dirspec  )  [static]

Definition at line 2295 of file plctrl.c.

PLFLT value ( double  n1,
double  n2,
double  hue 
) [static]

Definition at line 1112 of file plctrl.c.


Variable Documentation

void( * abort_handler)(const char *errormsg) [static]

Definition at line 82 of file plctrl.c.

int( * exit_handler)(const char *errormsg) [static]

Definition at line 79 of file plctrl.c.

char PLDLLIMPEXP* plplotLibDir = 0

Definition at line 70 of file plctrl.c.