PLplot
5.10.0
|
00001 // Macros and prototypes for the PLplot package. This header file must 00002 // be included by all user codes. 00003 // 00004 // Note: some systems allow the Fortran & C namespaces to clobber each 00005 // other. So for PLplot to work from Fortran, we do some rather nasty 00006 // things to the externally callable C function names. This shouldn't 00007 // affect any user programs in C as long as this file is included. 00008 // 00009 // Copyright (C) 1992 Maurice J. LeBrun, Geoff Furnish, Tony Richardson. 00010 // Copyright (C) 2004-2010 Alan W. Irwin 00011 // Copyright (C) 2004 Rafael Laboissiere 00012 // Copyright (C) 2004 Andrew Ross 00013 // 00014 // This file is part of PLplot. 00015 // 00016 // PLplot is free software; you can redistribute it and/or modify 00017 // it under the terms of the GNU Library General Public License as published 00018 // by the Free Software Foundation; either version 2 of the License, or 00019 // (at your option) any later version. 00020 // 00021 // PLplot is distributed in the hope that it will be useful, 00022 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 // GNU Library General Public License for more details. 00025 // 00026 // You should have received a copy of the GNU Library General Public License 00027 // along with PLplot; if not, write to the Free Software 00028 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00029 // 00030 00031 #ifndef __PLPLOT_H__ 00032 #define __PLPLOT_H__ 00033 00034 #include "plConfig.h" 00035 00036 //-------------------------------------------------------------------------- 00037 // USING PLplot 00038 // 00039 // To use PLplot from C or C++, it is only necessary to 00040 // 00041 // #include "plplot.h" 00042 // 00043 // This file does all the necessary setup to make PLplot accessible to 00044 // your program as documented in the manual. Additionally, this file 00045 // allows you to request certain behavior by defining certain symbols 00046 // before inclusion. At the moment the only one is: 00047 // 00048 // #define DOUBLE or.. 00049 // #define PL_DOUBLE 00050 // 00051 // This causes PLplot to use doubles instead of floats. Use the type 00052 // PLFLT everywhere in your code, and it will always be the right thing. 00053 // 00054 // Note: most of the functions visible here begin with "pl", while all 00055 // of the data types and switches begin with "PL". Eventually everything 00056 // will conform to this rule in order to keep namespace pollution of the 00057 // user code to a minimum. All the PLplot source files actually include 00058 // "plplotP.h", which includes this file as well as all the internally- 00059 // visible declarations, etc. 00060 //-------------------------------------------------------------------------- 00061 00062 // The majority of PLplot source files require these, so.. 00063 // Under ANSI C, they can be included any number of times. 00064 00065 #include <stdio.h> 00066 #include <stdlib.h> 00067 00068 //-------------------------------------------------------------------------- 00069 // SYSTEM IDENTIFICATION 00070 // 00071 // Several systems are supported directly by PLplot. In order to avoid 00072 // confusion, one id macro per system is used. Since different compilers 00073 // may predefine different system id macros, we need to check all the 00074 // possibilities, and then set the one we will be referencing. These are: 00075 // 00076 // __cplusplus Any C++ compiler 00077 // __unix Any Unix-like system 00078 // __hpux Any HP/UX system 00079 // __aix Any AIX system 00080 // __linux Linux for i386 00081 // (others...) 00082 // 00083 //-------------------------------------------------------------------------- 00084 00085 #ifdef unix // the old way 00086 #ifndef __unix 00087 #define __unix 00088 #endif 00089 #endif 00090 00091 #if 0 00092 #if defined ( __GNUC__ ) && __GNUC__ > 3 00093 // If gcc 4.x, then turn off all visibility of symbols unless 00094 // specified as visible using PLDLLIMPEXP. 00095 //#pragma GCC visibility push(hidden) 00096 // temporary until issues with above hidden can be sorted out 00097 #pragma GCC visibility push(default) 00098 #endif 00099 #endif 00100 // Make sure Unix systems define "__unix" 00101 00102 #if defined ( SX ) || /* NEC Super-UX */ \ 00103 ( defined ( _IBMR2 ) && defined ( _AIX ) ) || /* AIX */ \ 00104 defined ( __hpux ) || /* HP/UX */ \ 00105 defined ( sun ) || /* SUN */ \ 00106 defined ( CRAY ) || /* Cray */ \ 00107 defined ( __convexc__ ) || /* CONVEX */ \ 00108 ( defined ( __alpha ) && defined ( __osf__ ) ) || /* DEC Alpha AXP/OSF */ \ 00109 defined ( __APPLE__ ) // Max OS-X 00110 #ifndef __unix 00111 #define __unix 00112 #endif 00113 #endif 00114 00115 //-------------------------------------------------------------------------- 00116 // dll functions 00117 //-------------------------------------------------------------------------- 00118 #include "pldll.h" 00119 00120 // Macro to mark function parameters as unused. 00121 // For gcc this uses the unused attribute to remove compiler warnings. 00122 // For all compilers the parameter name is also mangled to prevent 00123 // accidental use. 00124 #ifdef PL_UNUSED 00125 #elif defined ( __GNUC__ ) 00126 # define PL_UNUSED( x ) UNUSED_ ## x __attribute__( ( unused ) ) 00127 #else 00128 # define PL_UNUSED( x ) UNUSED_ ## x 00129 #endif 00130 00131 //-------------------------------------------------------------------------- 00132 // Base types for PLplot 00133 // 00134 // Only those that are necessary for function prototypes are defined here. 00135 // Notes: 00136 // 00137 // PLINT is typedef'd to a long by default. This is a change from some 00138 // previous versions, where a int was used. However, so long as you have 00139 // used type PLINT for integer array arguments as specified by the API, 00140 // this change will be transparent for you. 00141 // 00142 // short is currently used for device page coordinates, so they are 00143 // bounded by (-32767, 32767). This gives a max resolution of about 3000 00144 // dpi, and improves performance in some areas over using a PLINT. 00145 // 00146 // PLUNICODE should be a 32-bit unsigned integer on all platforms. 00147 // For now, we are using unsigned int for our Linux ix86 unicode experiments, 00148 // but that doesn't guarantee 32 bits exactly on all platforms so this will 00149 // be subject to change. 00150 //-------------------------------------------------------------------------- 00151 00152 #if defined ( PL_DOUBLE ) || defined ( DOUBLE ) 00153 typedef double PLFLT; 00154 #define PLFLT_MAX DBL_MAX 00155 #define PLFLT_MIN DBL_MIN 00156 #else 00157 typedef float PLFLT; 00158 #define PLFLT_MAX FLT_MAX 00159 #define PLFLT_MIN FLT_MIN 00160 #endif 00161 00162 #if ( defined ( PL_HAVE_STDINT_H ) && !defined ( __cplusplus ) ) || \ 00163 ( defined ( __cplusplus ) && defined ( PL_HAVE_CXX_STDINT_H ) ) 00164 #include <stdint.h> 00165 // This is apparently portable if stdint.h exists. 00166 typedef uint32_t PLUINT; 00167 typedef int32_t PLINT; 00168 typedef int64_t PLINT64; 00169 #define PLINT_MIN INT32_MIN 00170 #else 00171 // A reasonable back-up in case stdint.h does not exist on the platform. 00172 typedef unsigned int PLUINT; 00173 typedef int PLINT; 00174 typedef __int64 PLINT64; 00175 // for Visual C++ 2003 and later INT_MIN must be used, otherwise 00176 // PLINT_MIN is unsigned and 2147483648 NOT -2147483648, see 00177 // http://msdn.microsoft.com/en-us/library/4kh09110(VS.71).aspx for 00178 // details 00179 #if defined ( _MSC_VER ) && _MSC_VER >= 1310 00180 #include <Limits.h> 00181 #define PLINT_MIN INT_MIN 00182 #else 00183 #define PLINT_MIN -2147483648 00184 #endif 00185 // 00186 // typedef unsigned int PLUINT; 00187 // typedef int PLINT; 00188 // typedef long long PLINT64; 00189 // 00190 #endif 00191 00192 // For identifying unicode characters 00193 typedef PLUINT PLUNICODE; 00194 00195 // For identifying logical (boolean) arguments 00196 typedef PLINT PLBOOL; 00197 00198 // For passing user data, as with X's XtPointer 00199 typedef void* PLPointer; 00200 00201 //-------------------------------------------------------------------------- 00202 // Complex data types and other good stuff 00203 //-------------------------------------------------------------------------- 00204 00205 // Switches for escape function call. 00206 // Some of these are obsolete but are retained in order to process 00207 // old metafiles 00208 00209 #define PLESC_SET_RGB 1 // obsolete 00210 #define PLESC_ALLOC_NCOL 2 // obsolete 00211 #define PLESC_SET_LPB 3 // obsolete 00212 #define PLESC_EXPOSE 4 // handle window expose 00213 #define PLESC_RESIZE 5 // handle window resize 00214 #define PLESC_REDRAW 6 // handle window redraw 00215 #define PLESC_TEXT 7 // switch to text screen 00216 #define PLESC_GRAPH 8 // switch to graphics screen 00217 #define PLESC_FILL 9 // fill polygon 00218 #define PLESC_DI 10 // handle DI command 00219 #define PLESC_FLUSH 11 // flush output 00220 #define PLESC_EH 12 // handle Window events 00221 #define PLESC_GETC 13 // get cursor position 00222 #define PLESC_SWIN 14 // set window parameters 00223 #define PLESC_DOUBLEBUFFERING 15 // configure double buffering 00224 #define PLESC_XORMOD 16 // set xor mode 00225 #define PLESC_SET_COMPRESSION 17 // AFR: set compression 00226 #define PLESC_CLEAR 18 // RL: clear graphics region 00227 #define PLESC_DASH 19 // RL: draw dashed line 00228 #define PLESC_HAS_TEXT 20 // driver draws text 00229 #define PLESC_IMAGE 21 // handle image 00230 #define PLESC_IMAGEOPS 22 // plimage related operations 00231 #define PLESC_PL2DEVCOL 23 // convert PLColor to device color 00232 #define PLESC_DEV2PLCOL 24 // convert device color to PLColor 00233 #define PLESC_SETBGFG 25 // set BG, FG colors 00234 #define PLESC_DEVINIT 26 // alternate device initialization 00235 #define PLESC_GETBACKEND 27 // get used backend of (wxWidgets) driver 00236 #define PLESC_BEGIN_TEXT 28 // get ready to draw a line of text 00237 #define PLESC_TEXT_CHAR 29 // render a character of text 00238 #define PLESC_CONTROL_CHAR 30 // handle a text control character (super/subscript, etc.) 00239 #define PLESC_END_TEXT 31 // finish a drawing a line of text 00240 #define PLESC_START_RASTERIZE 32 // start rasterized rendering 00241 #define PLESC_END_RASTERIZE 33 // end rasterized rendering 00242 #define PLESC_ARC 34 // render an arc 00243 #define PLESC_GRADIENT 35 // render a gradient 00244 #define PLESC_MODESET 36 // set drawing mode 00245 #define PLESC_MODEGET 37 // get drawing mode 00246 00247 // Alternative unicode text handling control characters 00248 #define PLTEXT_FONTCHANGE 0 // font change in the text stream 00249 #define PLTEXT_SUPERSCRIPT 1 // superscript in the text stream 00250 #define PLTEXT_SUBSCRIPT 2 // subscript in the text stream 00251 #define PLTEXT_BACKCHAR 3 // back-char in the text stream 00252 #define PLTEXT_OVERLINE 4 // toggle overline in the text stream 00253 #define PLTEXT_UNDERLINE 5 // toggle underline in the text stream 00254 00255 // image operations 00256 #define ZEROW2B 1 00257 #define ZEROW2D 2 00258 #define ONEW2B 3 00259 #define ONEW2D 4 00260 00261 // Window parameter tags 00262 00263 #define PLSWIN_DEVICE 1 // device coordinates 00264 #define PLSWIN_WORLD 2 // world coordinates 00265 00266 // Axis label tags 00267 #define PL_X_AXIS 1 // The x-axis 00268 #define PL_Y_AXIS 2 // The y-axis 00269 #define PL_Z_AXIS 3 // The z-axis 00270 00271 // PLplot Option table & support constants 00272 00273 // Option-specific settings 00274 00275 #define PL_OPT_ENABLED 0x0001 // Obsolete 00276 #define PL_OPT_ARG 0x0002 // Option has an argment 00277 #define PL_OPT_NODELETE 0x0004 // Don't delete after processing 00278 #define PL_OPT_INVISIBLE 0x0008 // Make invisible 00279 #define PL_OPT_DISABLED 0x0010 // Processing is disabled 00280 00281 // Option-processing settings -- mutually exclusive 00282 00283 #define PL_OPT_FUNC 0x0100 // Call handler function 00284 #define PL_OPT_BOOL 0x0200 // Set *var = 1 00285 #define PL_OPT_INT 0x0400 // Set *var = atoi(optarg) 00286 #define PL_OPT_FLOAT 0x0800 // Set *var = atof(optarg) 00287 #define PL_OPT_STRING 0x1000 // Set var = optarg 00288 00289 // Global mode settings 00290 // These override per-option settings 00291 00292 #define PL_PARSE_PARTIAL 0x0000 // For backward compatibility 00293 #define PL_PARSE_FULL 0x0001 // Process fully & exit if error 00294 #define PL_PARSE_QUIET 0x0002 // Don't issue messages 00295 #define PL_PARSE_NODELETE 0x0004 // Don't delete options after 00296 // processing 00297 #define PL_PARSE_SHOWALL 0x0008 // Show invisible options 00298 #define PL_PARSE_OVERRIDE 0x0010 // Obsolete 00299 #define PL_PARSE_NOPROGRAM 0x0020 // Program name NOT in *argv[0].. 00300 #define PL_PARSE_NODASH 0x0040 // Set if leading dash NOT required 00301 #define PL_PARSE_SKIP 0x0080 // Skip over unrecognized args 00302 00303 // FCI (font characterization integer) related constants. 00304 #define PL_FCI_MARK 0x80000000 00305 #define PL_FCI_IMPOSSIBLE 0x00000000 00306 #define PL_FCI_HEXDIGIT_MASK 0xf 00307 #define PL_FCI_HEXPOWER_MASK 0x7 00308 #define PL_FCI_HEXPOWER_IMPOSSIBLE 0xf 00309 // These define hexpower values corresponding to each font attribute. 00310 #define PL_FCI_FAMILY 0x0 00311 #define PL_FCI_STYLE 0x1 00312 #define PL_FCI_WEIGHT 0x2 00313 // These are legal values for font family attribute 00314 #define PL_FCI_SANS 0x0 00315 #define PL_FCI_SERIF 0x1 00316 #define PL_FCI_MONO 0x2 00317 #define PL_FCI_SCRIPT 0x3 00318 #define PL_FCI_SYMBOL 0x4 00319 // These are legal values for font style attribute 00320 #define PL_FCI_UPRIGHT 0x0 00321 #define PL_FCI_ITALIC 0x1 00322 #define PL_FCI_OBLIQUE 0x2 00323 // These are legal values for font weight attribute 00324 #define PL_FCI_MEDIUM 0x0 00325 #define PL_FCI_BOLD 0x1 00326 00327 #ifdef PL_DEPRECATED 00328 00329 // Obsolete names 00330 00331 #define plParseInternalOpts( a, b, c ) c_plparseopts( a, b, c ) 00332 #define plSetInternalOpt( a, b ) c_plsetopt( a, b ) 00333 00334 #endif // PL_DEPRECATED 00335 00336 00337 // Option table definition 00338 00339 typedef struct 00340 { 00341 const char *opt; 00342 int ( *handler )( const char *, const char *, void * ); 00343 void *client_data; 00344 void *var; 00345 long mode; 00346 const char *syntax; 00347 const char *desc; 00348 } PLOptionTable; 00349 00350 // PLplot Graphics Input structure 00351 00352 #define PL_MAXKEY 16 00353 00354 typedef struct 00355 { 00356 int type; // of event (CURRENTLY UNUSED) 00357 unsigned int state; // key or button mask 00358 unsigned int keysym; // key selected 00359 unsigned int button; // mouse button selected 00360 PLINT subwindow; // subwindow (alias subpage, alias subplot) number 00361 char string[PL_MAXKEY]; // translated string 00362 int pX, pY; // absolute device coordinates of pointer 00363 PLFLT dX, dY; // relative device coordinates of pointer 00364 PLFLT wX, wY; // world coordinates of pointer 00365 } PLGraphicsIn; 00366 00367 // Structure for describing the plot window 00368 00369 #define PL_MAXWINDOWS 64 // Max number of windows/page tracked 00370 00371 typedef struct 00372 { 00373 PLFLT dxmi, dxma, dymi, dyma; // min, max window rel dev coords 00374 PLFLT wxmi, wxma, wymi, wyma; // min, max window world coords 00375 } PLWindow; 00376 00377 // Structure for doing display-oriented operations via escape commands 00378 // May add other attributes in time 00379 00380 typedef struct 00381 { 00382 unsigned int x, y; // upper left hand corner 00383 unsigned int width, height; // window dimensions 00384 } PLDisplay; 00385 00386 // Macro used (in some cases) to ignore value of argument 00387 // I don't plan on changing the value so you can hard-code it 00388 00389 #define PL_NOTSET ( -42 ) 00390 00391 // See plcont.c for examples of the following 00392 00393 // 00394 // PLfGrid is for passing (as a pointer to the first element) an arbitrarily 00395 // dimensioned array. The grid dimensions MUST be stored, with a maximum of 3 00396 // dimensions assumed for now. 00397 // 00398 00399 typedef struct 00400 { 00401 const PLFLT *f; 00402 PLINT nx, ny, nz; 00403 } PLfGrid; 00404 00405 // 00406 // PLfGrid2 is for passing (as an array of pointers) a 2d function array. The 00407 // grid dimensions are passed for possible bounds checking. 00408 // 00409 00410 typedef struct 00411 { 00412 PLFLT **f; 00413 PLINT nx, ny; 00414 } PLfGrid2; 00415 00416 // 00417 // NOTE: a PLfGrid3 is a good idea here but there is no way to exploit it yet 00418 // so I'll leave it out for now. 00419 // 00420 00421 // 00422 // PLcGrid is for passing (as a pointer to the first element) arbitrarily 00423 // dimensioned coordinate transformation arrays. The grid dimensions MUST be 00424 // stored, with a maximum of 3 dimensions assumed for now. 00425 // 00426 00427 typedef struct 00428 { 00429 PLFLT *xg, *yg, *zg; 00430 PLINT nx, ny, nz; 00431 } PLcGrid; 00432 00433 // 00434 // PLcGrid2 is for passing (as arrays of pointers) 2d coordinate 00435 // transformation arrays. The grid dimensions are passed for possible bounds 00436 // checking. 00437 // 00438 00439 typedef struct 00440 { 00441 PLFLT **xg, **yg, **zg; 00442 PLINT nx, ny; 00443 } PLcGrid2; 00444 00445 // 00446 // NOTE: a PLcGrid3 is a good idea here but there is no way to exploit it yet 00447 // so I'll leave it out for now. 00448 // 00449 00450 // PLColor is the usual way to pass an rgb color value. 00451 00452 typedef struct 00453 { 00454 unsigned char r; // red 00455 unsigned char g; // green 00456 unsigned char b; // blue 00457 PLFLT a; // alpha (or transparency) 00458 const char *name; 00459 } PLColor; 00460 00461 // PLControlPt is how cmap1 control points are represented. 00462 00463 typedef struct 00464 { 00465 PLFLT h; // hue 00466 PLFLT l; // lightness 00467 PLFLT s; // saturation 00468 PLFLT p; // position 00469 PLFLT a; // alpha (or transparency) 00470 int alt_hue_path; // if set, interpolate through h=0 00471 } PLControlPt; 00472 00473 // A PLBufferingCB is a control block for interacting with devices 00474 // that support double buffering. 00475 00476 typedef struct 00477 { 00478 PLINT cmd; 00479 PLINT result; 00480 } PLBufferingCB; 00481 00482 #define PLESC_DOUBLEBUFFERING_ENABLE 1 00483 #define PLESC_DOUBLEBUFFERING_DISABLE 2 00484 #define PLESC_DOUBLEBUFFERING_QUERY 3 00485 00486 typedef struct 00487 { 00488 PLFLT exp_label_disp; 00489 PLFLT exp_label_pos; 00490 PLFLT exp_label_just; 00491 } PLLabelDefaults; 00492 00493 // 00494 // typedefs for access methods for arbitrary (i.e. user defined) data storage 00495 // 00496 00497 // 00498 // This type of struct holds pointers to functions that are used to get, set, 00499 // modify, and test individual 2-D data points referenced by a PLPointer. How 00500 // the PLPointer is used depends entirely on the functions that implement the 00501 // various operations. Certain common data representations have predefined 00502 // instances of this structure prepopulated with pointers to predefined 00503 // functions. 00504 // 00505 00506 typedef struct 00507 { 00508 PLFLT ( *get )( PLPointer p, PLINT ix, PLINT iy ); 00509 PLFLT ( *set )( PLPointer p, PLINT ix, PLINT iy, PLFLT z ); 00510 PLFLT ( *add )( PLPointer p, PLINT ix, PLINT iy, PLFLT z ); 00511 PLFLT ( *sub )( PLPointer p, PLINT ix, PLINT iy, PLFLT z ); 00512 PLFLT ( *mul )( PLPointer p, PLINT ix, PLINT iy, PLFLT z ); 00513 PLFLT ( *div )( PLPointer p, PLINT ix, PLINT iy, PLFLT z ); 00514 PLINT ( *is_nan )( PLPointer p, PLINT ix, PLINT iy ); 00515 void ( *minmax )( PLPointer p, PLINT nx, PLINT ny, PLFLT *zmim, PLFLT *zmax ); 00516 // 00517 // f2eval is backwards compatible signature for "f2eval" functions that 00518 // existed before plf2ops "operator function families" were used. 00519 // 00520 PLFLT ( *f2eval )( PLINT ix, PLINT iy, PLPointer p ); 00521 } plf2ops_t; 00522 00523 // 00524 // A typedef to facilitate declaration of a pointer to a plfops_t structure. 00525 // 00526 00527 typedef plf2ops_t * PLF2OPS; 00528 00529 //-------------------------------------------------------------------------- 00530 // BRAINDEAD-ness 00531 // 00532 // Some systems allow the Fortran & C namespaces to clobber each other. 00533 // For PLplot to work from Fortran on these systems, we must name the the 00534 // externally callable C functions something other than their Fortran entry 00535 // names. In order to make this as easy as possible for the casual user, 00536 // yet reversible to those who abhor my solution, I have done the 00537 // following: 00538 // 00539 // The C-language bindings are actually different from those 00540 // described in the manual. Macros are used to convert the 00541 // documented names to the names used in this package. The 00542 // user MUST include plplot.h in order to get the name 00543 // redefinition correct. 00544 // 00545 // Sorry to have to resort to such an ugly kludge, but it is really the 00546 // best way to handle the situation at present. If all available 00547 // compilers offer a way to correct this stupidity, then perhaps we can 00548 // eventually reverse it. 00549 // 00550 // If you feel like screaming at someone (I sure do), please 00551 // direct it at your nearest system vendor who has a braindead shared 00552 // C/Fortran namespace. Some vendors do offer compiler switches that 00553 // change the object names, but then everybody who wants to use the 00554 // package must throw these same switches, leading to no end of trouble. 00555 // 00556 // Note that this definition should not cause any noticable effects except 00557 // when debugging PLplot calls, in which case you will need to remember 00558 // the real function names (same as before but with a 'c_' prepended). 00559 // 00560 // Also, to avoid macro conflicts, the BRAINDEAD part must not be expanded 00561 // in the stub routines. 00562 // 00563 // Aside: the reason why a shared Fortran/C namespace is deserving of the 00564 // BRAINDEAD characterization is that it completely precludes the the kind 00565 // of universal API that is attempted (more or less) with PLplot, without 00566 // Herculean efforts (e.g. remapping all of the C bindings by macros as 00567 // done here). The vendors of such a scheme, in order to allow a SINGLE 00568 // type of argument to be passed transparently between C and Fortran, 00569 // namely, a pointer to a conformable data type, have slammed the door on 00570 // insertion of stub routines to handle the conversions needed for other 00571 // data types. Intelligent linkers could solve this problem, but these are 00572 // not anywhere close to becoming universal. So meanwhile, one must live 00573 // with either stub routines for the inevitable data conversions, or a 00574 // different API. The former is what is used here, but is made far more 00575 // difficult in a braindead shared Fortran/C namespace. 00576 //-------------------------------------------------------------------------- 00577 00578 #ifndef BRAINDEAD 00579 #define BRAINDEAD 00580 #endif 00581 00582 #ifdef BRAINDEAD 00583 00584 #ifndef __PLSTUBS_H__ // i.e. do not expand this in the stubs 00585 00586 #define pl_setcontlabelformat c_pl_setcontlabelformat 00587 #define pl_setcontlabelparam c_pl_setcontlabelparam 00588 #define pladv c_pladv 00589 #define plarc c_plarc 00590 #define plaxes c_plaxes 00591 #define plbin c_plbin 00592 #define plbop c_plbop 00593 #define plbox c_plbox 00594 #define plbox3 c_plbox3 00595 #define plbtime c_plbtime 00596 #define plcalc_world c_plcalc_world 00597 #define plclear c_plclear 00598 #define plcol0 c_plcol0 00599 #define plcol1 c_plcol1 00600 #define plcolorbar c_plcolorbar 00601 #define plconfigtime c_plconfigtime 00602 #define plcont c_plcont 00603 #define plcpstrm c_plcpstrm 00604 #define plctime c_plctime 00605 #define plend c_plend 00606 #define plend1 c_plend1 00607 #define plenv c_plenv 00608 #define plenv0 c_plenv0 00609 #define pleop c_pleop 00610 #define plerrx c_plerrx 00611 #define plerry c_plerry 00612 #define plfamadv c_plfamadv 00613 #define plfill c_plfill 00614 #define plfill3 c_plfill3 00615 #define plflush c_plflush 00616 #define plfont c_plfont 00617 #define plfontld c_plfontld 00618 #define plgchr c_plgchr 00619 #define plgcol0 c_plgcol0 00620 #define plgcol0a c_plgcol0a 00621 #define plgcolbg c_plgcolbg 00622 #define plgcolbga c_plgcolbga 00623 #define plgcompression c_plgcompression 00624 #define plgdev c_plgdev 00625 #define plgdidev c_plgdidev 00626 #define plgdiori c_plgdiori 00627 #define plgdiplt c_plgdiplt 00628 #define plgdrawmode c_plgdrawmode 00629 #define plgfam c_plgfam 00630 #define plgfci c_plgfci 00631 #define plgfnam c_plgfnam 00632 #define plgfont c_plgfont 00633 #define plglevel c_plglevel 00634 #define plgpage c_plgpage 00635 #define plgra c_plgra 00636 #define plgradient c_plgradient 00637 #define plgriddata c_plgriddata 00638 #define plgspa c_plgspa 00639 #define plgstrm c_plgstrm 00640 #define plgver c_plgver 00641 #define plgvpd c_plgvpd 00642 #define plgvpw c_plgvpw 00643 #define plgxax c_plgxax 00644 #define plgyax c_plgyax 00645 #define plgzax c_plgzax 00646 #define plhist c_plhist 00647 #ifdef PL_DEPRECATED 00648 #define plhls c_plhls 00649 #endif 00650 #define plhlsrgb c_plhlsrgb 00651 #define plimage c_plimage 00652 #define plimagefr c_plimagefr 00653 #define plinit c_plinit 00654 #define pljoin c_pljoin 00655 #define pllab c_pllab 00656 #define pllegend c_pllegend 00657 #define pllightsource c_pllightsource 00658 #define plline c_plline 00659 #define plpath c_plpath 00660 #define plline3 c_plline3 00661 #define pllsty c_pllsty 00662 #define plmap c_plmap 00663 #define plmapline c_plmapline 00664 #define plmapstring c_plmapstring 00665 #define plmaptex c_plmaptex 00666 #define plmapfill c_plmapfill 00667 #define plmeridians c_plmeridians 00668 #define plmesh c_plmesh 00669 #define plmeshc c_plmeshc 00670 #define plmkstrm c_plmkstrm 00671 #define plmtex c_plmtex 00672 #define plmtex3 c_plmtex3 00673 #define plot3d c_plot3d 00674 #define plot3dc c_plot3dc 00675 #define plot3dcl c_plot3dcl 00676 #define plparseopts c_plparseopts 00677 #define plpat c_plpat 00678 #define plpoin c_plpoin 00679 #define plpoin3 c_plpoin3 00680 #define plpoly3 c_plpoly3 00681 #define plprec c_plprec 00682 #define plpsty c_plpsty 00683 #define plptex c_plptex 00684 #define plptex3 c_plptex3 00685 #define plrandd c_plrandd 00686 #define plreplot c_plreplot 00687 #ifdef PL_DEPRECATED 00688 #define plrgb c_plrgb 00689 #define plrgb1 c_plrgb1 00690 #endif 00691 #define plrgbhls c_plrgbhls 00692 #define plschr c_plschr 00693 #define plscmap0 c_plscmap0 00694 #define plscmap0a c_plscmap0a 00695 #define plscmap0n c_plscmap0n 00696 #define plscmap1 c_plscmap1 00697 #define plscmap1a c_plscmap1a 00698 #define plscmap1l c_plscmap1l 00699 #define plscmap1la c_plscmap1la 00700 #define plscmap1n c_plscmap1n 00701 #define plscmap1_range c_plscmap1_range 00702 #define plgcmap1_range c_plgcmap1_range 00703 #define plscol0 c_plscol0 00704 #define plscol0a c_plscol0a 00705 #define plscolbg c_plscolbg 00706 #define plscolbga c_plscolbga 00707 #define plscolor c_plscolor 00708 #define plscompression c_plscompression 00709 #define plsdev c_plsdev 00710 #define plsdidev c_plsdidev 00711 #define plsdimap c_plsdimap 00712 #define plsdiori c_plsdiori 00713 #define plsdiplt c_plsdiplt 00714 #define plsdiplz c_plsdiplz 00715 #define plseed c_plseed 00716 #define plsesc c_plsesc 00717 #define plsetopt c_plsetopt 00718 #define plsfam c_plsfam 00719 #define plsfci c_plsfci 00720 #define plsfnam c_plsfnam 00721 #define plsfont c_plsfont 00722 #define plshade c_plshade 00723 #define plshade1 c_plshade1 00724 #define plshades c_plshades 00725 #define plslabelfunc c_plslabelfunc 00726 #define plsmaj c_plsmaj 00727 #define plsmem c_plsmem 00728 #define plsmema c_plsmema 00729 #define plsmin c_plsmin 00730 #define plsdrawmode c_plsdrawmode 00731 #define plsori c_plsori 00732 #define plspage c_plspage 00733 #define plspal0 c_plspal0 00734 #define plspal1 c_plspal1 00735 #define plspause c_plspause 00736 #define plsstrm c_plsstrm 00737 #define plssub c_plssub 00738 #define plssym c_plssym 00739 #define plstar c_plstar 00740 #define plstart c_plstart 00741 #define plstransform c_plstransform 00742 #define plstring c_plstring 00743 #define plstring3 c_plstring3 00744 #define plstripa c_plstripa 00745 #define plstripc c_plstripc 00746 #define plstripd c_plstripd 00747 #define plstyl c_plstyl 00748 #define plsurf3d c_plsurf3d 00749 #define plsurf3dl c_plsurf3dl 00750 #define plsvect c_plsvect 00751 #define plsvpa c_plsvpa 00752 #define plsxax c_plsxax 00753 #define plsyax c_plsyax 00754 #define plsym c_plsym 00755 #define plszax c_plszax 00756 #define pltext c_pltext 00757 #define pltimefmt c_pltimefmt 00758 #define plvasp c_plvasp 00759 #define plvect c_plvect 00760 #define plvpas c_plvpas 00761 #define plvpor c_plvpor 00762 #define plvsta c_plvsta 00763 #define plw3d c_plw3d 00764 #ifdef PL_DEPRECATED 00765 #define plwid c_plwid 00766 #endif 00767 #define plwidth c_plwidth 00768 #define plwind c_plwind 00769 #define plxormod c_plxormod 00770 00771 #endif // __PLSTUBS_H__ 00772 00773 #endif // BRAINDEAD 00774 00775 // Redefine some old function names for backward compatibility 00776 00777 #ifndef __PLSTUBS_H__ // i.e. do not expand this in the stubs 00778 00779 #ifdef PL_DEPRECATED 00780 00781 #define plclr pleop 00782 #define plpage plbop 00783 #define plcol plcol0 00784 #define plcontf plfcont 00785 // Comment out these as they can upset the C++ bindings since the C++ 00786 // bindings use the function names without the pl prefix. 00787 //#define Alloc2dGrid plAlloc2dGrid 00788 //#define Free2dGrid plFree2dGrid 00789 //#define MinMax2dGrid plMinMax2dGrid 00790 #define plP_gvpd plgvpd 00791 #define plP_gvpw plgvpw 00792 #define plotsh3d( x, y, z, nx, ny, opt ) plsurf3d( x, y, z, nx, ny, opt, NULL, 0 ) 00793 00794 #endif // PL_DEPRECATED 00795 00796 #endif // __PLSTUBS_H__ 00797 00798 //-------------------------------------------------------------------------- 00799 // Function Prototypes 00800 //-------------------------------------------------------------------------- 00801 00802 #ifdef __cplusplus 00803 extern "C" { 00804 #endif 00805 00806 // All void types 00807 00808 // C routines callable from stub routines come first 00809 00810 // set the format of the contour labels 00811 00812 PLDLLIMPEXP void 00813 c_pl_setcontlabelformat( PLINT lexp, PLINT sigdig ); 00814 00815 // set offset and spacing of contour labels 00816 00817 PLDLLIMPEXP void 00818 c_pl_setcontlabelparam( PLFLT offset, PLFLT size, PLFLT spacing, PLINT active ); 00819 00820 // Advance to subpage "page", or to the next one if "page" = 0. 00821 00822 PLDLLIMPEXP void 00823 c_pladv( PLINT page ); 00824 00825 // Plot an arc 00826 00827 PLDLLIMPEXP void 00828 c_plarc( PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2, 00829 PLFLT rotate, PLBOOL fill ); 00830 00831 // This functions similarly to plbox() except that the origin of the axes 00832 // is placed at the user-specified point (x0, y0). 00833 00834 PLDLLIMPEXP void 00835 c_plaxes( PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, 00836 const char *yopt, PLFLT ytick, PLINT nysub ); 00837 00838 // Plot a histogram using x to store data values and y to store frequencies 00839 00840 // Flags for plbin() - opt argument 00841 #define PL_BIN_DEFAULT 0x0 00842 #define PL_BIN_CENTRED 0x1 00843 #define PL_BIN_NOEXPAND 0x2 00844 #define PL_BIN_NOEMPTY 0x4 00845 00846 PLDLLIMPEXP void 00847 c_plbin( PLINT nbin, const PLFLT *x, const PLFLT *y, PLINT opt ); 00848 00849 // Calculate broken-down time from continuous time for current stream. 00850 PLDLLIMPEXP void 00851 c_plbtime( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT ctime ); 00852 00853 // Start new page. Should only be used with pleop(). 00854 00855 PLDLLIMPEXP void 00856 c_plbop( void ); 00857 00858 // This draws a box around the current viewport. 00859 00860 PLDLLIMPEXP void 00861 c_plbox( const char *xopt, PLFLT xtick, PLINT nxsub, 00862 const char *yopt, PLFLT ytick, PLINT nysub ); 00863 00864 // This is the 3-d analogue of plbox(). 00865 00866 PLDLLIMPEXP void 00867 c_plbox3( const char *xopt, const char *xlabel, PLFLT xtick, PLINT nxsub, 00868 const char *yopt, const char *ylabel, PLFLT ytick, PLINT nysub, 00869 const char *zopt, const char *zlabel, PLFLT ztick, PLINT nzsub ); 00870 00871 // Calculate world coordinates and subpage from relative device coordinates. 00872 00873 PLDLLIMPEXP void 00874 c_plcalc_world( PLFLT rx, PLFLT ry, PLFLT *wx, PLFLT *wy, PLINT *window ); 00875 00876 // Clear current subpage. 00877 00878 PLDLLIMPEXP void 00879 c_plclear( void ); 00880 00881 // Set color, map 0. Argument is integer between 0 and 15. 00882 00883 PLDLLIMPEXP void 00884 c_plcol0( PLINT icol0 ); 00885 00886 // Set color, map 1. Argument is a float between 0. and 1. 00887 00888 PLDLLIMPEXP void 00889 c_plcol1( PLFLT col1 ); 00890 00891 // Configure transformation between continuous and broken-down time (and 00892 // vice versa) for current stream. 00893 PLDLLIMPEXP void 00894 c_plconfigtime( PLFLT scale, PLFLT offset1, PLFLT offset2, PLINT ccontrol, PLBOOL ifbtime_offset, PLINT year, PLINT month, PLINT day, PLINT hour, PLINT min, PLFLT sec ); 00895 00896 // Draws a contour plot from data in f(nx,ny). Is just a front-end to 00897 // plfcont, with a particular choice for f2eval and f2eval_data. 00898 // 00899 00900 PLDLLIMPEXP void 00901 c_plcont( const PLFLT * const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, 00902 PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, 00903 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 00904 PLPointer pltr_data ); 00905 00906 // Draws a contour plot using the function evaluator f2eval and data stored 00907 // by way of the f2eval_data pointer. This allows arbitrary organizations 00908 // of 2d array data to be used. 00909 // 00910 00911 PLDLLIMPEXP void 00912 plfcont( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), 00913 PLPointer f2eval_data, 00914 PLINT nx, PLINT ny, PLINT kx, PLINT lx, 00915 PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, 00916 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 00917 PLPointer pltr_data ); 00918 00919 // Copies state parameters from the reference stream to the current stream. 00920 00921 PLDLLIMPEXP void 00922 c_plcpstrm( PLINT iplsr, PLBOOL flags ); 00923 00924 // Calculate continuous time from broken-down time for current stream. 00925 PLDLLIMPEXP void 00926 c_plctime( PLINT year, PLINT month, PLINT day, PLINT hour, PLINT min, PLFLT sec, PLFLT *ctime ); 00927 00928 // Converts input values from relative device coordinates to relative plot 00929 // coordinates. 00930 00931 PLDLLIMPEXP void 00932 pldid2pc( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax ); 00933 00934 // Converts input values from relative plot coordinates to relative 00935 // device coordinates. 00936 00937 PLDLLIMPEXP void 00938 pldip2dc( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax ); 00939 00940 // End a plotting session for all open streams. 00941 00942 PLDLLIMPEXP void 00943 c_plend( void ); 00944 00945 // End a plotting session for the current stream only. 00946 00947 PLDLLIMPEXP void 00948 c_plend1( void ); 00949 00950 // Simple interface for defining viewport and window. 00951 00952 PLDLLIMPEXP void 00953 c_plenv( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 00954 PLINT just, PLINT axis ); 00955 00956 00957 // similar to plenv() above, but in multiplot mode does not advance the subpage, 00958 // instead the current subpage is cleared 00959 00960 PLDLLIMPEXP void 00961 c_plenv0( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 00962 PLINT just, PLINT axis ); 00963 00964 // End current page. Should only be used with plbop(). 00965 00966 PLDLLIMPEXP void 00967 c_pleop( void ); 00968 00969 // Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i)) 00970 00971 PLDLLIMPEXP void 00972 c_plerrx( PLINT n, const PLFLT *xmin, const PLFLT *xmax, const PLFLT *y ); 00973 00974 // Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i)) 00975 00976 PLDLLIMPEXP void 00977 c_plerry( PLINT n, const PLFLT *x, const PLFLT *ymin, const PLFLT *ymax ); 00978 00979 // Advance to the next family file on the next new page 00980 00981 PLDLLIMPEXP void 00982 c_plfamadv( void ); 00983 00984 // Pattern fills the polygon bounded by the input points. 00985 00986 PLDLLIMPEXP void 00987 c_plfill( PLINT n, const PLFLT *x, const PLFLT *y ); 00988 00989 // Pattern fills the 3d polygon bounded by the input points. 00990 00991 PLDLLIMPEXP void 00992 c_plfill3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z ); 00993 00994 // Flushes the output stream. Use sparingly, if at all. 00995 00996 PLDLLIMPEXP void 00997 c_plflush( void ); 00998 00999 // Sets the global font flag to 'ifont'. 01000 01001 PLDLLIMPEXP void 01002 c_plfont( PLINT ifont ); 01003 01004 // Load specified font set. 01005 01006 PLDLLIMPEXP void 01007 c_plfontld( PLINT fnt ); 01008 01009 // Get character default height and current (scaled) height 01010 01011 PLDLLIMPEXP void 01012 c_plgchr( PLFLT *p_def, PLFLT *p_ht ); 01013 01014 // Returns 8 bit RGB values for given color from color map 0 01015 01016 PLDLLIMPEXP void 01017 c_plgcol0( PLINT icol0, PLINT *r, PLINT *g, PLINT *b ); 01018 01019 // Returns 8 bit RGB values for given color from color map 0 and alpha value 01020 01021 PLDLLIMPEXP void 01022 c_plgcol0a( PLINT icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *alpha ); 01023 01024 // Returns the background color by 8 bit RGB value 01025 01026 PLDLLIMPEXP void 01027 c_plgcolbg( PLINT *r, PLINT *g, PLINT *b ); 01028 01029 // Returns the background color by 8 bit RGB value and alpha value 01030 01031 PLDLLIMPEXP void 01032 c_plgcolbga( PLINT *r, PLINT *g, PLINT *b, PLFLT *alpha ); 01033 01034 // Returns the current compression setting 01035 01036 PLDLLIMPEXP void 01037 c_plgcompression( PLINT *compression ); 01038 01039 // Get the current device (keyword) name 01040 01041 PLDLLIMPEXP void 01042 c_plgdev( char *p_dev ); 01043 01044 // Retrieve current window into device space 01045 01046 PLDLLIMPEXP void 01047 c_plgdidev( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy ); 01048 01049 // Get plot orientation 01050 01051 PLDLLIMPEXP void 01052 c_plgdiori( PLFLT *p_rot ); 01053 01054 // Retrieve current window into plot space 01055 01056 PLDLLIMPEXP void 01057 c_plgdiplt( PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax ); 01058 01059 // Get the drawing mode 01060 01061 PLDLLIMPEXP PLINT 01062 c_plgdrawmode( void ); 01063 01064 // Get FCI (font characterization integer) 01065 01066 PLDLLIMPEXP void 01067 c_plgfci( PLUNICODE *p_fci ); 01068 01069 // Get family file parameters 01070 01071 PLDLLIMPEXP void 01072 c_plgfam( PLINT *p_fam, PLINT *p_num, PLINT *p_bmax ); 01073 01074 // Get the (current) output file name. Must be preallocated to >80 bytes 01075 01076 PLDLLIMPEXP void 01077 c_plgfnam( char *fnam ); 01078 01079 // Get the current font family, style and weight 01080 01081 PLDLLIMPEXP void 01082 c_plgfont( PLINT *p_family, PLINT *p_style, PLINT *p_weight ); 01083 01084 // Get the (current) run level. 01085 01086 PLDLLIMPEXP void 01087 c_plglevel( PLINT *p_level ); 01088 01089 // Get output device parameters. 01090 01091 PLDLLIMPEXP void 01092 c_plgpage( PLFLT *p_xp, PLFLT *p_yp, 01093 PLINT *p_xleng, PLINT *p_yleng, PLINT *p_xoff, PLINT *p_yoff ); 01094 01095 // Switches to graphics screen. 01096 01097 PLDLLIMPEXP void 01098 c_plgra( void ); 01099 01100 // Draw gradient in polygon. 01101 01102 PLDLLIMPEXP void 01103 c_plgradient( PLINT n, const PLFLT *x, const PLFLT *y, PLFLT angle ); 01104 01105 // grid irregularly sampled data 01106 01107 PLDLLIMPEXP void 01108 c_plgriddata( const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT npts, 01109 const PLFLT *xg, PLINT nptsx, const PLFLT *yg, PLINT nptsy, 01110 PLFLT **zg, PLINT type, PLFLT data ); 01111 01112 PLDLLIMPEXP void 01113 plfgriddata( const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT npts, 01114 const PLFLT *xg, PLINT nptsx, const PLFLT *yg, PLINT nptsy, 01115 PLF2OPS zops, PLPointer zgp, PLINT type, PLFLT data ); 01116 01117 // type of gridding algorithm for plgriddata() 01118 01119 #define GRID_CSA 1 // Bivariate Cubic Spline approximation 01120 #define GRID_DTLI 2 // Delaunay Triangulation Linear Interpolation 01121 #define GRID_NNI 3 // Natural Neighbors Interpolation 01122 #define GRID_NNIDW 4 // Nearest Neighbors Inverse Distance Weighted 01123 #define GRID_NNLI 5 // Nearest Neighbors Linear Interpolation 01124 #define GRID_NNAIDW 6 // Nearest Neighbors Around Inverse Distance Weighted 01125 01126 // Get subpage boundaries in absolute coordinates 01127 01128 PLDLLIMPEXP void 01129 c_plgspa( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax ); 01130 01131 // Get current stream number. 01132 01133 PLDLLIMPEXP void 01134 c_plgstrm( PLINT *p_strm ); 01135 01136 // Get the current library version number 01137 01138 PLDLLIMPEXP void 01139 c_plgver( char *p_ver ); 01140 01141 // Get viewport boundaries in normalized device coordinates 01142 01143 PLDLLIMPEXP void 01144 c_plgvpd( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax ); 01145 01146 // Get viewport boundaries in world coordinates 01147 01148 PLDLLIMPEXP void 01149 c_plgvpw( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax ); 01150 01151 // Get x axis labeling parameters 01152 01153 PLDLLIMPEXP void 01154 c_plgxax( PLINT *p_digmax, PLINT *p_digits ); 01155 01156 // Get y axis labeling parameters 01157 01158 PLDLLIMPEXP void 01159 c_plgyax( PLINT *p_digmax, PLINT *p_digits ); 01160 01161 // Get z axis labeling parameters 01162 01163 PLDLLIMPEXP void 01164 c_plgzax( PLINT *p_digmax, PLINT *p_digits ); 01165 01166 // Draws a histogram of n values of a variable in array data[0..n-1] 01167 01168 // Flags for plhist() - opt argument; note: some flags are passed to 01169 // plbin() for the actual plotting 01170 #define PL_HIST_DEFAULT 0x00 01171 #define PL_HIST_NOSCALING 0x01 01172 #define PL_HIST_IGNORE_OUTLIERS 0x02 01173 #define PL_HIST_NOEXPAND 0x08 01174 #define PL_HIST_NOEMPTY 0x10 01175 01176 PLDLLIMPEXP void 01177 c_plhist( PLINT n, const PLFLT *data, PLFLT datmin, PLFLT datmax, 01178 PLINT nbin, PLINT opt ); 01179 01180 // Functions for converting between HLS and RGB color space 01181 01182 PLDLLIMPEXP void 01183 c_plhlsrgb( PLFLT h, PLFLT l, PLFLT s, PLFLT *p_r, PLFLT *p_g, PLFLT *p_b ); 01184 01185 // Initializes PLplot, using preset or default options 01186 01187 PLDLLIMPEXP void 01188 c_plinit( void ); 01189 01190 // Draws a line segment from (x1, y1) to (x2, y2). 01191 01192 PLDLLIMPEXP void 01193 c_pljoin( PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 ); 01194 01195 // Simple routine for labelling graphs. 01196 01197 PLDLLIMPEXP void 01198 c_pllab( const char *xlabel, const char *ylabel, const char *tlabel ); 01199 01200 //flags used for position argument of both pllegend and plcolorbar 01201 #define PL_POSITION_LEFT 0x1 01202 #define PL_POSITION_RIGHT 0x2 01203 #define PL_POSITION_TOP 0x4 01204 #define PL_POSITION_BOTTOM 0x8 01205 #define PL_POSITION_INSIDE 0x10 01206 #define PL_POSITION_OUTSIDE 0x20 01207 #define PL_POSITION_VIEWPORT 0x40 01208 #define PL_POSITION_SUBPAGE 0x80 01209 01210 // Flags for pllegend. 01211 #define PL_LEGEND_NONE 0x1 01212 #define PL_LEGEND_COLOR_BOX 0x2 01213 #define PL_LEGEND_LINE 0x4 01214 #define PL_LEGEND_SYMBOL 0x8 01215 #define PL_LEGEND_TEXT_LEFT 0x10 01216 #define PL_LEGEND_BACKGROUND 0x20 01217 #define PL_LEGEND_BOUNDING_BOX 0x40 01218 #define PL_LEGEND_ROW_MAJOR 0x80 01219 01220 // Flags for plcolorbar 01221 #define PL_COLORBAR_LABEL_LEFT 0x1 01222 #define PL_COLORBAR_LABEL_RIGHT 0x2 01223 #define PL_COLORBAR_LABEL_TOP 0x4 01224 #define PL_COLORBAR_LABEL_BOTTOM 0x8 01225 #define PL_COLORBAR_IMAGE 0x10 01226 #define PL_COLORBAR_SHADE 0x20 01227 #define PL_COLORBAR_GRADIENT 0x40 01228 #define PL_COLORBAR_CAP_NONE 0x80 01229 #define PL_COLORBAR_CAP_LOW 0x100 01230 #define PL_COLORBAR_CAP_HIGH 0x200 01231 #define PL_COLORBAR_SHADE_LABEL 0x400 01232 #define PL_COLORBAR_ORIENT_RIGHT 0x800 01233 #define PL_COLORBAR_ORIENT_TOP 0x1000 01234 #define PL_COLORBAR_ORIENT_LEFT 0x2000 01235 #define PL_COLORBAR_ORIENT_BOTTOM 0x4000 01236 #define PL_COLORBAR_BACKGROUND 0x8000 01237 #define PL_COLORBAR_BOUNDING_BOX 0x10000 01238 01239 // Flags for drawing mode 01240 #define PL_DRAWMODE_UNKNOWN 0x0 01241 #define PL_DRAWMODE_DEFAULT 0x1 01242 #define PL_DRAWMODE_REPLACE 0x2 01243 #define PL_DRAWMODE_XOR 0x4 01244 01245 // Routine for drawing discrete line, symbol, or cmap0 legends 01246 PLDLLIMPEXP void 01247 c_pllegend( PLFLT *p_legend_width, PLFLT *p_legend_height, 01248 PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT plot_width, 01249 PLINT bg_color, PLINT bb_color, PLINT bb_style, 01250 PLINT nrow, PLINT ncolumn, 01251 PLINT nlegend, const PLINT *opt_array, 01252 PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, 01253 PLFLT text_justification, 01254 const PLINT *text_colors, const char * const *text, 01255 const PLINT *box_colors, const PLINT *box_patterns, 01256 const PLFLT *box_scales, const PLFLT *box_line_widths, 01257 const PLINT *line_colors, const PLINT *line_styles, 01258 const PLFLT *line_widths, 01259 const PLINT *symbol_colors, const PLFLT *symbol_scales, 01260 const PLINT *symbol_numbers, const char * const *symbols ); 01261 01262 // Routine for drawing continous colour legends 01263 PLDLLIMPEXP void 01264 c_plcolorbar( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height, 01265 PLINT opt, PLINT position, PLFLT x, PLFLT y, 01266 PLFLT x_length, PLFLT y_length, 01267 PLINT bg_color, PLINT bb_color, PLINT bb_style, 01268 PLFLT low_cap_color, PLFLT high_cap_color, 01269 PLINT cont_color, PLFLT cont_width, 01270 PLINT n_labels, const PLINT *label_opts, const char * const *labels, 01271 PLINT n_axes, const char * const * axis_opts, 01272 const PLFLT *ticks, const PLINT *sub_ticks, 01273 const PLINT *n_values, const PLFLT * const *values ); 01274 01275 // Sets position of the light source 01276 PLDLLIMPEXP void 01277 c_pllightsource( PLFLT x, PLFLT y, PLFLT z ); 01278 01279 // Draws line segments connecting a series of points. 01280 01281 PLDLLIMPEXP void 01282 c_plline( PLINT n, const PLFLT *x, const PLFLT *y ); 01283 01284 // Draws a line in 3 space. 01285 01286 PLDLLIMPEXP void 01287 c_plline3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z ); 01288 01289 // Set line style. 01290 01291 PLDLLIMPEXP void 01292 c_pllsty( PLINT lin ); 01293 01294 // Plot continental outline in world coordinates 01295 01296 PLDLLIMPEXP void 01297 c_plmap( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, 01298 PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ); 01299 01300 // Plot map outlines 01301 01302 PLDLLIMPEXP void 01303 c_plmapline( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, 01304 PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, 01305 int* plotentries, int nplotentries); 01306 01307 // Plot map points 01308 01309 PLDLLIMPEXP void 01310 c_plmapstring( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), 01311 const char *type, const char *string, 01312 PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, 01313 int* plotentries, int nplotentries); 01314 01315 // Plot map text 01316 01317 PLDLLIMPEXP void 01318 c_plmaptex( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), 01319 const char *type, PLFLT dx, PLFLT dy, PLFLT just, const char *text, 01320 PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, 01321 int plotentry); 01322 01323 // Plot map fills 01324 01325 PLDLLIMPEXP void 01326 c_plmapfill( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), 01327 const char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, 01328 PLFLT maxlat, int* plotentries, int nplotentries); 01329 01330 // Plot the latitudes and longitudes on the background. 01331 01332 PLDLLIMPEXP void 01333 c_plmeridians( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), 01334 PLFLT dlong, PLFLT dlat, 01335 PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ); 01336 01337 // Plots a mesh representation of the function z[x][y]. 01338 01339 PLDLLIMPEXP void 01340 c_plmesh( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt ); 01341 01342 // Like plmesh, but uses an evaluator function to access z data from zp 01343 01344 PLDLLIMPEXP void 01345 plfmesh( const PLFLT *x, const PLFLT *y, PLF2OPS zops, PLPointer zp, 01346 PLINT nx, PLINT ny, PLINT opt ); 01347 01348 // Plots a mesh representation of the function z[x][y] with contour 01349 01350 PLDLLIMPEXP void 01351 c_plmeshc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, 01352 const PLFLT *clevel, PLINT nlevel ); 01353 01354 // Like plmeshc, but uses an evaluator function to access z data from zp 01355 01356 PLDLLIMPEXP void 01357 plfmeshc( const PLFLT *x, const PLFLT *y, PLF2OPS zops, PLPointer zp, 01358 PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ); 01359 01360 // Creates a new stream and makes it the default. 01361 01362 PLDLLIMPEXP void 01363 c_plmkstrm( PLINT *p_strm ); 01364 01365 // Prints out "text" at specified position relative to viewport 01366 01367 PLDLLIMPEXP void 01368 c_plmtex( const char *side, PLFLT disp, PLFLT pos, PLFLT just, 01369 const char *text ); 01370 01371 // Prints out "text" at specified position relative to viewport (3D) 01372 01373 PLDLLIMPEXP void 01374 c_plmtex3( const char *side, PLFLT disp, PLFLT pos, PLFLT just, 01375 const char *text ); 01376 01377 // Plots a 3-d representation of the function z[x][y]. 01378 01379 PLDLLIMPEXP void 01380 c_plot3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 01381 PLINT nx, PLINT ny, PLINT opt, PLBOOL side ); 01382 01383 // Like plot3d, but uses an evaluator function to access z data from zp 01384 01385 PLDLLIMPEXP void 01386 plfplot3d( const PLFLT *x, const PLFLT *y, PLF2OPS zops, PLPointer zp, 01387 PLINT nx, PLINT ny, PLINT opt, PLBOOL side ); 01388 01389 // Plots a 3-d representation of the function z[x][y] with contour. 01390 01391 PLDLLIMPEXP void 01392 c_plot3dc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 01393 PLINT nx, PLINT ny, PLINT opt, 01394 const PLFLT *clevel, PLINT nlevel ); 01395 01396 // Like plot3dc, but uses an evaluator function to access z data from zp 01397 01398 PLDLLIMPEXP void 01399 plfplot3dc( const PLFLT *x, const PLFLT *y, PLF2OPS zops, PLPointer zp, 01400 PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ); 01401 01402 // Plots a 3-d representation of the function z[x][y] with contour and 01403 // y index limits. 01404 01405 PLDLLIMPEXP void 01406 c_plot3dcl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 01407 PLINT nx, PLINT ny, PLINT opt, 01408 const PLFLT *clevel, PLINT nlevel, 01409 PLINT indexxmin, PLINT indexxmax, const PLINT *indexymin, const PLINT *indexymax ); 01410 01411 // Like plot3dcl, but uses an evaluator function to access z data from zp 01412 01413 PLDLLIMPEXP void 01414 plfplot3dcl( const PLFLT *x, const PLFLT *y, PLF2OPS zops, PLPointer zp, 01415 PLINT nx, PLINT ny, PLINT opt, 01416 const PLFLT *clevel, PLINT nlevel, 01417 PLINT indexxmin, PLINT indexxmax, const PLINT *indexymin, const PLINT *indexymax ); 01418 01419 // 01420 // definitions for the opt argument in plot3dc() and plsurf3d() 01421 // 01422 // DRAW_LINEX *must* be 1 and DRAW_LINEY *must* be 2, because of legacy code! 01423 // 01424 01425 #define DRAW_LINEX 0x001 // draw lines parallel to the X axis 01426 #define DRAW_LINEY 0x002 // draw lines parallel to the Y axis 01427 #define DRAW_LINEXY 0x003 // draw lines parallel to both the X and Y axis 01428 #define MAG_COLOR 0x004 // draw the mesh with a color dependent of the magnitude 01429 #define BASE_CONT 0x008 // draw contour plot at bottom xy plane 01430 #define TOP_CONT 0x010 // draw contour plot at top xy plane 01431 #define SURF_CONT 0x020 // draw contour plot at surface 01432 #define DRAW_SIDES 0x040 // draw sides 01433 #define FACETED 0x080 // draw outline for each square that makes up the surface 01434 #define MESH 0x100 // draw mesh 01435 01436 // 01437 // valid options for plot3dc(): 01438 // 01439 // DRAW_SIDES, BASE_CONT, TOP_CONT (not yet), 01440 // MAG_COLOR, DRAW_LINEX, DRAW_LINEY, DRAW_LINEXY. 01441 // 01442 // valid options for plsurf3d(): 01443 // 01444 // MAG_COLOR, BASE_CONT, SURF_CONT, FACETED, DRAW_SIDES. 01445 // 01446 01447 // Set fill pattern directly. 01448 01449 PLDLLIMPEXP void 01450 c_plpat( PLINT nlin, const PLINT *inc, const PLINT *del ); 01451 01452 // Draw a line connecting two points, accounting for coordinate transforms 01453 01454 PLDLLIMPEXP void 01455 c_plpath( PLINT n, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 ); 01456 01457 // Plots array y against x for n points using ASCII code "code". 01458 01459 PLDLLIMPEXP void 01460 c_plpoin( PLINT n, const PLFLT *x, const PLFLT *y, PLINT code ); 01461 01462 // Draws a series of points in 3 space. 01463 01464 PLDLLIMPEXP void 01465 c_plpoin3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT code ); 01466 01467 // Draws a polygon in 3 space. 01468 01469 PLDLLIMPEXP void 01470 c_plpoly3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const PLBOOL *draw, PLBOOL ifcc ); 01471 01472 // Set the floating point precision (in number of places) in numeric labels. 01473 01474 PLDLLIMPEXP void 01475 c_plprec( PLINT setp, PLINT prec ); 01476 01477 // Set fill pattern, using one of the predefined patterns. 01478 01479 PLDLLIMPEXP void 01480 c_plpsty( PLINT patt ); 01481 01482 // Prints out "text" at world cooordinate (x,y). 01483 01484 PLDLLIMPEXP void 01485 c_plptex( PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, const char *text ); 01486 01487 // Prints out "text" at world cooordinate (x,y,z). 01488 01489 PLDLLIMPEXP void 01490 c_plptex3( PLFLT wx, PLFLT wy, PLFLT wz, PLFLT dx, PLFLT dy, PLFLT dz, 01491 PLFLT sx, PLFLT sy, PLFLT sz, PLFLT just, const char *text ); 01492 01493 // Random number generator based on Mersenne Twister. 01494 // Obtain real random number in range [0,1]. 01495 01496 PLDLLIMPEXP PLFLT 01497 c_plrandd( void ); 01498 01499 // Replays contents of plot buffer to current device/file. 01500 01501 PLDLLIMPEXP void 01502 c_plreplot( void ); 01503 01504 // Functions for converting between HLS and RGB color space 01505 01506 PLDLLIMPEXP void 01507 c_plrgbhls( PLFLT r, PLFLT g, PLFLT b, PLFLT *p_h, PLFLT *p_l, PLFLT *p_s ); 01508 01509 // Set character height. 01510 01511 PLDLLIMPEXP void 01512 c_plschr( PLFLT def, PLFLT scale ); 01513 01514 // Set color map 0 colors by 8 bit RGB values 01515 01516 PLDLLIMPEXP void 01517 c_plscmap0( const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol0 ); 01518 01519 // Set color map 0 colors by 8 bit RGB values and alpha values 01520 01521 PLDLLIMPEXP void 01522 c_plscmap0a( const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *alpha, PLINT ncol0 ); 01523 01524 // Set number of colors in cmap 0 01525 01526 PLDLLIMPEXP void 01527 c_plscmap0n( PLINT ncol0 ); 01528 01529 // Set color map 1 colors by 8 bit RGB values 01530 01531 PLDLLIMPEXP void 01532 c_plscmap1( const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol1 ); 01533 01534 // Set color map 1 colors by 8 bit RGB and alpha values 01535 01536 PLDLLIMPEXP void 01537 c_plscmap1a( const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *alpha, PLINT ncol1 ); 01538 01539 // Set color map 1 colors using a piece-wise linear relationship between 01540 // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. 01541 01542 PLDLLIMPEXP void 01543 c_plscmap1l( PLBOOL itype, PLINT npts, const PLFLT *intensity, 01544 const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLBOOL *alt_hue_path ); 01545 01546 // Set color map 1 colors using a piece-wise linear relationship between 01547 // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. 01548 // Will also linear interpolate alpha values. 01549 01550 PLDLLIMPEXP void 01551 c_plscmap1la( PLBOOL itype, PLINT npts, const PLFLT *intensity, 01552 const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *alpha, const PLBOOL *alt_hue_path ); 01553 01554 // Set number of colors in cmap 1 01555 01556 PLDLLIMPEXP void 01557 c_plscmap1n( PLINT ncol1 ); 01558 01559 // Set the color map 1 range used in continuous plots 01560 01561 PLDLLIMPEXP void 01562 c_plscmap1_range( PLFLT min_color, PLFLT max_color ); 01563 01564 // Get the color map 1 range used in continuous plots 01565 01566 PLDLLIMPEXP void 01567 c_plgcmap1_range( PLFLT *min_color, PLFLT *max_color ); 01568 01569 // Set a given color from color map 0 by 8 bit RGB value 01570 01571 PLDLLIMPEXP void 01572 c_plscol0( PLINT icol0, PLINT r, PLINT g, PLINT b ); 01573 01574 // Set a given color from color map 0 by 8 bit RGB value 01575 01576 PLDLLIMPEXP void 01577 c_plscol0a( PLINT icol0, PLINT r, PLINT g, PLINT b, PLFLT alpha ); 01578 01579 // Set the background color by 8 bit RGB value 01580 01581 PLDLLIMPEXP void 01582 c_plscolbg( PLINT r, PLINT g, PLINT b ); 01583 01584 // Set the background color by 8 bit RGB value and alpha value 01585 01586 PLDLLIMPEXP void 01587 c_plscolbga( PLINT r, PLINT g, PLINT b, PLFLT alpha ); 01588 01589 // Used to globally turn color output on/off 01590 01591 PLDLLIMPEXP void 01592 c_plscolor( PLINT color ); 01593 01594 // Set the compression level 01595 01596 PLDLLIMPEXP void 01597 c_plscompression( PLINT compression ); 01598 01599 // Set the device (keyword) name 01600 01601 PLDLLIMPEXP void 01602 c_plsdev( const char *devname ); 01603 01604 // Set window into device space using margin, aspect ratio, and 01605 // justification 01606 01607 PLDLLIMPEXP void 01608 c_plsdidev( PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy ); 01609 01610 // Set up transformation from metafile coordinates. 01611 01612 PLDLLIMPEXP void 01613 c_plsdimap( PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, 01614 PLFLT dimxpmm, PLFLT dimypmm ); 01615 01616 // Set plot orientation, specifying rotation in units of pi/2. 01617 01618 PLDLLIMPEXP void 01619 c_plsdiori( PLFLT rot ); 01620 01621 // Set window into plot space 01622 01623 PLDLLIMPEXP void 01624 c_plsdiplt( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax ); 01625 01626 // Set window into plot space incrementally (zoom) 01627 01628 PLDLLIMPEXP void 01629 c_plsdiplz( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax ); 01630 01631 // Set seed for internal random number generator 01632 01633 PLDLLIMPEXP void 01634 c_plseed( unsigned int seed ); 01635 01636 // Set the escape character for text strings. 01637 01638 PLDLLIMPEXP void 01639 c_plsesc( char esc ); 01640 01641 // Set family file parameters 01642 01643 PLDLLIMPEXP void 01644 c_plsfam( PLINT fam, PLINT num, PLINT bmax ); 01645 01646 // Set FCI (font characterization integer) 01647 01648 PLDLLIMPEXP void 01649 c_plsfci( PLUNICODE fci ); 01650 01651 // Set the output file name. 01652 01653 PLDLLIMPEXP void 01654 c_plsfnam( const char *fnam ); 01655 01656 // Set the current font family, style and weight 01657 01658 PLDLLIMPEXP void 01659 c_plsfont( PLINT family, PLINT style, PLINT weight ); 01660 01661 // Shade region. 01662 01663 PLDLLIMPEXP void 01664 c_plshade( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), 01665 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 01666 PLFLT shade_min, PLFLT shade_max, 01667 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 01668 PLINT min_color, PLFLT min_width, 01669 PLINT max_color, PLFLT max_width, 01670 void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLBOOL rectangular, 01671 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01672 PLPointer pltr_data ); 01673 01674 PLDLLIMPEXP void 01675 c_plshade1( const PLFLT *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), 01676 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 01677 PLFLT shade_min, PLFLT shade_max, 01678 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 01679 PLINT min_color, PLFLT min_width, 01680 PLINT max_color, PLFLT max_width, 01681 void ( *fill )( const PLINT, const PLFLT *, const PLFLT * ), PLBOOL rectangular, 01682 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01683 PLPointer pltr_data ); 01684 01685 PLDLLIMPEXP void 01686 c_plshades( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), 01687 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 01688 const PLFLT *clevel, PLINT nlevel, PLFLT fill_width, 01689 PLINT cont_color, PLFLT cont_width, 01690 void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLBOOL rectangular, 01691 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01692 PLPointer pltr_data ); 01693 01694 PLDLLIMPEXP void 01695 plfshades( PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny, 01696 PLINT ( *defined )( PLFLT, PLFLT ), 01697 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 01698 const PLFLT *clevel, PLINT nlevel, PLFLT fill_width, 01699 PLINT cont_color, PLFLT cont_width, 01700 void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, 01701 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01702 PLPointer pltr_data ); 01703 01704 PLDLLIMPEXP void 01705 plfshade( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), 01706 PLPointer f2eval_data, 01707 PLFLT ( *c2eval )( PLINT, PLINT, PLPointer ), 01708 PLPointer c2eval_data, 01709 PLINT nx, PLINT ny, 01710 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, 01711 PLFLT shade_min, PLFLT shade_max, 01712 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 01713 PLINT min_color, PLFLT min_width, 01714 PLINT max_color, PLFLT max_width, 01715 void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLBOOL rectangular, 01716 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01717 PLPointer pltr_data ); 01718 01719 PLDLLIMPEXP void 01720 plfshade1( PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny, 01721 PLINT ( *defined )( PLFLT, PLFLT ), 01722 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 01723 PLFLT shade_min, PLFLT shade_max, 01724 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 01725 PLINT min_color, PLFLT min_width, 01726 PLINT max_color, PLFLT max_width, 01727 void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, 01728 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01729 PLPointer pltr_data ); 01730 01731 // Setup a user-provided custom labeling function 01732 01733 PLDLLIMPEXP void 01734 c_plslabelfunc( void ( *label_func )( PLINT, PLFLT, char *, PLINT, PLPointer ), 01735 PLPointer label_data ); 01736 01737 // Set up lengths of major tick marks. 01738 01739 PLDLLIMPEXP void 01740 c_plsmaj( PLFLT def, PLFLT scale ); 01741 01742 // Set the RGB memory area to be plotted (with the 'mem' or 'memcairo' drivers) 01743 01744 PLDLLIMPEXP void 01745 c_plsmem( PLINT maxx, PLINT maxy, void *plotmem ); 01746 01747 // Set the RGBA memory area to be plotted (with the 'memcairo' driver) 01748 01749 PLDLLIMPEXP void 01750 c_plsmema( PLINT maxx, PLINT maxy, void *plotmem ); 01751 01752 // Set up lengths of minor tick marks. 01753 01754 PLDLLIMPEXP void 01755 c_plsmin( PLFLT def, PLFLT scale ); 01756 01757 // Set the drawing mode 01758 PLDLLIMPEXP void 01759 c_plsdrawmode( PLINT mode ); 01760 01761 // Set orientation. Must be done before calling plinit. 01762 01763 PLDLLIMPEXP void 01764 c_plsori( PLINT ori ); 01765 01766 // Set output device parameters. Usually ignored by the driver. 01767 01768 PLDLLIMPEXP void 01769 c_plspage( PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, 01770 PLINT xoff, PLINT yoff ); 01771 01772 // Set the colors for color table 0 from a cmap0 file 01773 01774 PLDLLIMPEXP void 01775 c_plspal0( const char *filename ); 01776 01777 // Set the colors for color table 1 from a cmap1 file 01778 01779 PLDLLIMPEXP void 01780 c_plspal1( const char *filename, PLBOOL interpolate ); 01781 01782 // Set the pause (on end-of-page) status 01783 01784 PLDLLIMPEXP void 01785 c_plspause( PLBOOL pause ); 01786 01787 // Set stream number. 01788 01789 PLDLLIMPEXP void 01790 c_plsstrm( PLINT strm ); 01791 01792 // Set the number of subwindows in x and y 01793 01794 PLDLLIMPEXP void 01795 c_plssub( PLINT nx, PLINT ny ); 01796 01797 // Set symbol height. 01798 01799 PLDLLIMPEXP void 01800 c_plssym( PLFLT def, PLFLT scale ); 01801 01802 // Initialize PLplot, passing in the windows/page settings. 01803 01804 PLDLLIMPEXP void 01805 c_plstar( PLINT nx, PLINT ny ); 01806 01807 // Initialize PLplot, passing the device name and windows/page settings. 01808 01809 PLDLLIMPEXP void 01810 c_plstart( const char *devname, PLINT nx, PLINT ny ); 01811 01812 // Set the coordinate transform 01813 01814 PLDLLIMPEXP void 01815 c_plstransform( void ( *coordinate_transform )( PLFLT, PLFLT, PLFLT*, PLFLT*, PLPointer ), PLPointer coordinate_transform_data ); 01816 01817 // Prints out the same string repeatedly at the n points in world 01818 // coordinates given by the x and y arrays. Supersedes plpoin and 01819 // plsymbol for the case where text refers to a unicode glyph either 01820 // directly as UTF-8 or indirectly via the standard text escape 01821 // sequences allowed for PLplot input strings. 01822 01823 PLDLLIMPEXP void 01824 c_plstring( PLINT n, const PLFLT *x, const PLFLT *y, const char *string ); 01825 01826 // Prints out the same string repeatedly at the n points in world 01827 // coordinates given by the x, y, and z arrays. Supersedes plpoin3 01828 // for the case where text refers to a unicode glyph either directly 01829 // as UTF-8 or indirectly via the standard text escape sequences 01830 // allowed for PLplot input strings. 01831 01832 PLDLLIMPEXP void 01833 c_plstring3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const char *string ); 01834 01835 // Add a point to a stripchart. 01836 01837 PLDLLIMPEXP void 01838 c_plstripa( PLINT id, PLINT pen, PLFLT x, PLFLT y ); 01839 01840 // Create 1d stripchart 01841 01842 PLDLLIMPEXP void 01843 c_plstripc( PLINT *id, const char *xspec, const char *yspec, 01844 PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, 01845 PLFLT xlpos, PLFLT ylpos, 01846 PLBOOL y_ascl, PLBOOL acc, 01847 PLINT colbox, PLINT collab, 01848 const PLINT colline[], const PLINT styline[], const char *legline[], 01849 const char *labx, const char *laby, const char *labtop ); 01850 01851 // Deletes and releases memory used by a stripchart. 01852 01853 PLDLLIMPEXP void 01854 c_plstripd( PLINT id ); 01855 01856 // plots a 2d image (or a matrix too large for plshade() ) 01857 01858 PLDLLIMPEXP void 01859 c_plimagefr( const PLFLT * const *idata, PLINT nx, PLINT ny, 01860 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, 01861 PLFLT valuemin, PLFLT valuemax, 01862 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01863 PLPointer pltr_data ); 01864 01865 // 01866 // Like plimagefr, but uses an evaluator function to access image data from 01867 // idatap. getminmax is only used if zmin == zmax. 01868 // 01869 01870 PLDLLIMPEXP void 01871 plfimagefr( PLF2OPS idataops, PLPointer idatap, PLINT nx, PLINT ny, 01872 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, 01873 PLFLT valuemin, PLFLT valuemax, 01874 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01875 PLPointer pltr_data ); 01876 01877 // plots a 2d image (or a matrix too large for plshade() ) - colors 01878 // automatically scaled 01879 01880 PLDLLIMPEXP void 01881 c_plimage( const PLFLT * const *idata, PLINT nx, PLINT ny, 01882 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, 01883 PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax ); 01884 01885 // 01886 // Like plimage, but uses an operator functions to access image data from 01887 // idatap. 01888 // 01889 01890 PLDLLIMPEXP void 01891 plfimage( PLF2OPS idataops, PLPointer idatap, PLINT nx, PLINT ny, 01892 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, 01893 PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax ); 01894 01895 // Set up a new line style 01896 01897 PLDLLIMPEXP void 01898 c_plstyl( PLINT nms, const PLINT *mark, const PLINT *space ); 01899 01900 // Plots the 3d surface representation of the function z[x][y]. 01901 01902 PLDLLIMPEXP void 01903 c_plsurf3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, 01904 PLINT opt, const PLFLT *clevel, PLINT nlevel ); 01905 01906 // Like plsurf3d, but uses an evaluator function to access z data from zp 01907 01908 PLDLLIMPEXP void 01909 plfsurf3d( const PLFLT *x, const PLFLT *y, PLF2OPS zops, PLPointer zp, 01910 PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ); 01911 01912 // Plots the 3d surface representation of the function z[x][y] with y 01913 // index limits. 01914 01915 PLDLLIMPEXP void 01916 c_plsurf3dl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, 01917 PLINT opt, const PLFLT *clevel, PLINT nlevel, 01918 PLINT indexxmin, PLINT indexxmax, const PLINT *indexymin, const PLINT *indexymax ); 01919 01920 // Like plsurf3dl, but uses an evaluator function to access z data from zp 01921 01922 PLDLLIMPEXP void 01923 plfsurf3dl( const PLFLT *x, const PLFLT *y, PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny, 01924 PLINT opt, const PLFLT *clevel, PLINT nlevel, 01925 PLINT indexxmin, PLINT indexxmax, const PLINT *indexymin, const PLINT *indexymax ); 01926 01927 // Set arrow style for vector plots. 01928 PLDLLIMPEXP void 01929 c_plsvect( const PLFLT *arrowx, const PLFLT *arrowy, PLINT npts, PLBOOL fill ); 01930 01931 // Sets the edges of the viewport to the specified absolute coordinates 01932 01933 PLDLLIMPEXP void 01934 c_plsvpa( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 01935 01936 // Set x axis labeling parameters 01937 01938 PLDLLIMPEXP void 01939 c_plsxax( PLINT digmax, PLINT digits ); 01940 01941 // Set inferior X window 01942 01943 PLDLLIMPEXP void 01944 plsxwin( PLINT window_id ); 01945 01946 // Set y axis labeling parameters 01947 01948 PLDLLIMPEXP void 01949 c_plsyax( PLINT digmax, PLINT digits ); 01950 01951 // Plots array y against x for n points using Hershey symbol "code" 01952 01953 PLDLLIMPEXP void 01954 c_plsym( PLINT n, const PLFLT *x, const PLFLT *y, PLINT code ); 01955 01956 // Set z axis labeling parameters 01957 01958 PLDLLIMPEXP void 01959 c_plszax( PLINT digmax, PLINT digits ); 01960 01961 // Switches to text screen. 01962 01963 PLDLLIMPEXP void 01964 c_pltext( void ); 01965 01966 // Set the format for date / time labels for current stream. 01967 01968 PLDLLIMPEXP void 01969 c_pltimefmt( const char *fmt ); 01970 01971 // Sets the edges of the viewport with the given aspect ratio, leaving 01972 // room for labels. 01973 01974 PLDLLIMPEXP void 01975 c_plvasp( PLFLT aspect ); 01976 01977 // Creates the largest viewport of the specified aspect ratio that fits 01978 // within the specified normalized subpage coordinates. 01979 01980 // simple arrow plotter. 01981 01982 PLDLLIMPEXP void 01983 c_plvect( const PLFLT * const *u, const PLFLT * const *v, PLINT nx, PLINT ny, PLFLT scale, 01984 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01985 PLPointer pltr_data ); 01986 01987 // 01988 // Routine to plot a vector array with arbitrary coordinate 01989 // and vector transformations 01990 // 01991 PLDLLIMPEXP void 01992 plfvect( PLFLT ( *getuv )( PLINT, PLINT, PLPointer ), 01993 PLPointer up, PLPointer vp, 01994 PLINT nx, PLINT ny, PLFLT scale, 01995 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), 01996 PLPointer pltr_data ); 01997 01998 PLDLLIMPEXP void 01999 c_plvpas( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect ); 02000 02001 // Creates a viewport with the specified normalized subpage coordinates. 02002 02003 PLDLLIMPEXP void 02004 c_plvpor( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 02005 02006 // Defines a "standard" viewport with seven character heights for 02007 // the left margin and four character heights everywhere else. 02008 02009 PLDLLIMPEXP void 02010 c_plvsta( void ); 02011 02012 // Set up a window for three-dimensional plotting. 02013 02014 PLDLLIMPEXP void 02015 c_plw3d( PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin, 02016 PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, 02017 PLFLT zmax, PLFLT alt, PLFLT az ); 02018 02019 #ifdef PL_DEPRECATED 02020 // Set pen width with deprecated integer width 02021 02022 PLDLLIMPEXP void 02023 c_plwid( PLINT width ); 02024 #endif 02025 02026 // Set pen width. 02027 02028 PLDLLIMPEXP void 02029 c_plwidth( PLFLT width ); 02030 02031 // Set up world coordinates of the viewport boundaries (2d plots). 02032 02033 PLDLLIMPEXP void 02034 c_plwind( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 02035 02036 // Set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device 02037 02038 PLDLLIMPEXP void 02039 c_plxormod( PLBOOL mode, PLBOOL *status ); 02040 02041 02042 //-------------------------------------------------------------------------- 02043 // Functions for use from C or C++ only 02044 //-------------------------------------------------------------------------- 02045 02046 // Returns a list of file-oriented device names and their menu strings 02047 02048 PLDLLIMPEXP void 02049 plgFileDevs( const char ***p_menustr, const char ***p_devname, int *p_ndev ); 02050 02051 // Returns a list of all device names and their menu strings 02052 02053 PLDLLIMPEXP void 02054 plgDevs( const char ***p_menustr, const char ***p_devname, int *p_ndev ); 02055 02056 // Set the function pointer for the keyboard event handler 02057 02058 PLDLLIMPEXP void 02059 plsKeyEH( void ( *KeyEH )( PLGraphicsIn *, void *, int * ), void *KeyEH_data ); 02060 02061 // Set the function pointer for the (mouse) button event handler 02062 02063 PLDLLIMPEXP void 02064 plsButtonEH( void ( *ButtonEH )( PLGraphicsIn *, void *, int * ), 02065 void *ButtonEH_data ); 02066 02067 // Sets an optional user bop handler 02068 02069 PLDLLIMPEXP void 02070 plsbopH( void ( *handler )( void *, int * ), void *handler_data ); 02071 02072 // Sets an optional user eop handler 02073 02074 PLDLLIMPEXP void 02075 plseopH( void ( *handler )( void *, int * ), void *handler_data ); 02076 02077 // Set the variables to be used for storing error info 02078 02079 PLDLLIMPEXP void 02080 plsError( PLINT *errcode, char *errmsg ); 02081 02082 // Sets an optional user exit handler. 02083 02084 PLDLLIMPEXP void 02085 plsexit( int ( *handler )( const char * ) ); 02086 02087 // Sets an optional user abort handler. 02088 02089 PLDLLIMPEXP void 02090 plsabort( void ( *handler )( const char * ) ); 02091 02092 // Transformation routines 02093 02094 // Identity transformation. 02095 02096 PLDLLIMPEXP void 02097 pltr0( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 02098 02099 // Does linear interpolation from singly dimensioned coord arrays. 02100 02101 PLDLLIMPEXP void 02102 pltr1( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 02103 02104 // Does linear interpolation from doubly dimensioned coord arrays 02105 // (column dominant, as per normal C 2d arrays). 02106 02107 PLDLLIMPEXP void 02108 pltr2( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 02109 02110 // Just like pltr2() but uses pointer arithmetic to get coordinates from 02111 // 2d grid tables. 02112 02113 PLDLLIMPEXP void 02114 pltr2p( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 02115 02116 // Does linear interpolation from doubly dimensioned coord arrays 02117 // (row dominant, i.e. Fortran ordering). 02118 02119 PLDLLIMPEXP void 02120 pltr2f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ); 02121 02122 // 02123 // Returns a pointer to a plf2ops_t stucture with pointers to functions for 02124 // accessing 2-D data referenced as (PLFLT **), such as the C variable z 02125 // declared as... 02126 // 02127 // PLFLT z[nx][ny]; 02128 // 02129 02130 PLDLLIMPEXP PLF2OPS 02131 plf2ops_c( void ); 02132 02133 // 02134 // Returns a pointer to a plf2ops_t stucture with pointers to functions for accessing 2-D data 02135 // referenced as (PLfGrid2 *), where the PLfGrid2's "f" is treated as type 02136 // (PLFLT **). 02137 // 02138 02139 PLDLLIMPEXP PLF2OPS 02140 plf2ops_grid_c( void ); 02141 02142 // 02143 // Returns a pointer to a plf2ops_t stucture with pointers to functions for 02144 // accessing 2-D data stored in (PLfGrid2 *), with the PLfGrid2's "f" field 02145 // treated as type (PLFLT *) pointing to 2-D data stored in row-major order. 02146 // In the context of plotting, it might be easier to think of it as "X-major" 02147 // order. In this ordering, values for a single X index are stored in 02148 // consecutive memory locations. 02149 // 02150 02151 PLDLLIMPEXP PLF2OPS 02152 plf2ops_grid_row_major( void ); 02153 02154 // 02155 // Returns a pointer to a plf2ops_t stucture with pointers to functions for 02156 // accessing 2-D data stored in (PLfGrid2 *), with the PLfGrid2's "f" field 02157 // treated as type (PLFLT *) pointing to 2-D data stored in column-major order. 02158 // In the context of plotting, it might be easier to think of it as "Y-major" 02159 // order. In this ordering, values for a single Y index are stored in 02160 // consecutive memory locations. 02161 // 02162 02163 PLDLLIMPEXP PLF2OPS 02164 plf2ops_grid_col_major( void ); 02165 02166 02167 // Function evaluators (Should these be deprecated in favor of plf2ops?) 02168 02169 // 02170 // Does a lookup from a 2d function array. plf2eval_data is treated as type 02171 // (PLFLT **) and data for (ix,iy) is returned from... 02172 // 02173 // plf2eval_data[ix][iy]; 02174 // 02175 02176 PLDLLIMPEXP PLFLT 02177 plf2eval1( PLINT ix, PLINT iy, PLPointer plf2eval_data ); 02178 02179 // 02180 // Does a lookup from a 2d function array. plf2eval_data is treated as type 02181 // (PLfGrid2 *) and data for (ix,iy) is returned from... 02182 // 02183 // plf2eval_data->f[ix][iy]; 02184 // 02185 02186 PLDLLIMPEXP PLFLT 02187 plf2eval2( PLINT ix, PLINT iy, PLPointer plf2eval_data ); 02188 02189 // 02190 // Does a lookup from a 2d function array. plf2eval_data is treated as type 02191 // (PLfGrid *) and data for (ix,iy) is returned from... 02192 // 02193 // plf2eval_data->f[ix * plf2eval_data->ny + iy]; 02194 // 02195 // This is commonly called "row-major order", but in the context of plotting, 02196 // it might be easier to think of it as "X-major order". In this ordering, 02197 // values for a single X index are stored in consecutive memory locations. 02198 // This is also known as C ordering. 02199 // 02200 02201 PLDLLIMPEXP PLFLT 02202 plf2eval( PLINT ix, PLINT iy, PLPointer plf2eval_data ); 02203 02204 // 02205 // Does a lookup from a 2d function array. plf2eval_data is treated as type 02206 // (PLfGrid *) and data for (ix,iy) is returned from... 02207 // 02208 // plf2eval_data->f[ix + iy * plf2eval_data->nx]; 02209 // 02210 // This is commonly called "column-major order", but in the context of 02211 // plotting, it might be easier to think of it as "Y-major order". In this 02212 // ordering, values for a single Y index are stored in consecutive memory 02213 // locations. This is also known as FORTRAN ordering. 02214 // 02215 02216 PLDLLIMPEXP PLFLT 02217 plf2evalr( PLINT ix, PLINT iy, PLPointer plf2eval_data ); 02218 02219 // Command line parsing utilities 02220 02221 // Clear internal option table info structure. 02222 02223 PLDLLIMPEXP void 02224 plClearOpts( void ); 02225 02226 // Reset internal option table info structure. 02227 02228 PLDLLIMPEXP void 02229 plResetOpts( void ); 02230 02231 // Merge user option table into internal info structure. 02232 02233 PLDLLIMPEXP int 02234 plMergeOpts( PLOptionTable *options, const char *name, const char **notes ); 02235 02236 // Set the strings used in usage and syntax messages. 02237 02238 PLDLLIMPEXP void 02239 plSetUsage( const char *program_string, const char *usage_string ); 02240 02241 // Process input strings, treating them as an option and argument pair. 02242 // The first is for the external API, the second the work routine declared 02243 // here for backward compatibilty. 02244 02245 PLDLLIMPEXP int 02246 c_plsetopt( const char *opt, const char *optarg ); 02247 02248 #ifdef PL_DEPRECATED 02249 02250 PLDLLIMPEXP int 02251 plSetOpt( const char *opt, const char *optarg ); 02252 02253 #endif // PL_DEPRECATED 02254 02255 // Process options list using current options info. 02256 02257 PLDLLIMPEXP int 02258 c_plparseopts( int *p_argc, const char **argv, PLINT mode ); 02259 02260 // Print usage & syntax message. 02261 02262 PLDLLIMPEXP void 02263 plOptUsage( void ); 02264 02265 // Miscellaneous 02266 02267 // Set the output file pointer 02268 02269 PLDLLIMPEXP void 02270 plgfile( FILE **p_file ); 02271 02272 // Get the output file pointer 02273 02274 PLDLLIMPEXP void 02275 plsfile( FILE *file ); 02276 02277 // Get the escape character for text strings. 02278 02279 PLDLLIMPEXP void 02280 plgesc( char *p_esc ); 02281 02282 // Front-end to driver escape function. 02283 02284 PLDLLIMPEXP void 02285 pl_cmd( PLINT op, void *ptr ); 02286 02287 // Return full pathname for given file if executable 02288 02289 PLDLLIMPEXP int 02290 plFindName( char *p ); 02291 02292 // Looks for the specified executable file according to usual search path. 02293 02294 PLDLLIMPEXP char * 02295 plFindCommand( const char *fn ); 02296 02297 // Gets search name for file by concatenating the dir, subdir, and file 02298 // name, allocating memory as needed. 02299 02300 PLDLLIMPEXP void 02301 plGetName( const char *dir, const char *subdir, const char *filename, char **filespec ); 02302 02303 // Prompts human to input an integer in response to given message. 02304 02305 PLDLLIMPEXP PLINT 02306 plGetInt( const char *s ); 02307 02308 // Prompts human to input a float in response to given message. 02309 02310 PLDLLIMPEXP PLFLT 02311 plGetFlt( const char *s ); 02312 02313 // Nice way to allocate space for a vectored 2d grid 02314 02315 // Allocates a block of memory for use as a 2-d grid of PLFLT's. 02316 02317 PLDLLIMPEXP void 02318 plAlloc2dGrid( PLFLT ***f, PLINT nx, PLINT ny ); 02319 02320 // Frees a block of memory allocated with plAlloc2dGrid(). 02321 02322 PLDLLIMPEXP void 02323 plFree2dGrid( PLFLT **f, PLINT nx, PLINT ny ); 02324 02325 // Find the maximum and minimum of a 2d matrix allocated with plAllc2dGrid(). 02326 02327 PLDLLIMPEXP void 02328 plMinMax2dGrid( const PLFLT * const *f, PLINT nx, PLINT ny, PLFLT *fmax, PLFLT *fmin ); 02329 02330 // Wait for graphics input event and translate to world coordinates 02331 02332 PLDLLIMPEXP int 02333 plGetCursor( PLGraphicsIn *gin ); 02334 02335 // Translates relative device coordinates to world coordinates. 02336 02337 PLDLLIMPEXP int 02338 plTranslateCursor( PLGraphicsIn *gin ); 02339 02340 #ifdef PL_DEPRECATED 02341 02342 // These functions are depreciated and only retained for backwards 02343 // compatibility - do not use in new code. 02344 02345 // Set current color (map 0) by hue, lightness, and saturation. 02346 02347 PLDLLIMPEXP void 02348 c_plhls( PLFLT h, PLFLT l, PLFLT s ); 02349 02350 // Set line color by red, green, blue from 0. to 1. 02351 02352 PLDLLIMPEXP void 02353 c_plrgb( PLFLT r, PLFLT g, PLFLT b ); 02354 02355 // Set line color by 8 bit RGB values. 02356 02357 PLDLLIMPEXP void 02358 c_plrgb1( PLINT r, PLINT g, PLINT b ); 02359 02360 #endif // PL_DEPRECATED 02361 02362 02363 #ifdef __cplusplus 02364 } 02365 #endif 02366 #if 0 02367 #if defined ( __GNUC__ ) && __GNUC__ > 3 02368 #pragma GCC visibility pop 02369 #endif 02370 #endif 02371 02372 #endif // __PLPLOT_H__