~ubuntu-branches/ubuntu/intrepid/plplot/intrepid

« back to all changes in this revision

Viewing changes to bindings/java/PLStream.java

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere
  • Date: 2006-11-04 10:19:34 UTC
  • mfrom: (2.1.8 edgy)
  • Revision ID: james.westby@ubuntu.com-20061104101934-mlirvdg4gpwi6i5q
Tags: 5.6.1-10
* Orphaning the package
* debian/control: Changed the maintainer to the Debian QA Group

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//---------------------------------------------------------------------------//
2
 
// $Id: PLStream.java,v 1.25 2002/10/14 17:40:57 jcard Exp $
3
 
//
4
 
// This file implements the core Java side of the Java->PLplot interface, by
5
 
// providing a Java class PLStream, which is intended to mirror the C
6
 
// PLStream of PLplot.  However, we go further here in Java than we were able
7
 
// to do in C, by actually making the PLplot API entry points methods of this
8
 
// stream class.  Thus, to plot to a stream in Java, you just instantiate the
9
 
// stream, and invoke PLplot API services upon it.  This is basically what we
10
 
// have tried to do in the bindings to other object oriented environments,
11
 
// such as C++ and the Tcl/Tk and Python/Tk widget contexts.  A stream
12
 
// represents sort of a "drawable" abstraction, and the PLplot API gets the
13
 
// drawing done on the identified stream.  In C you have to swtich the stream
14
 
// explicitly with the plsstrm function, but in Java you just invoke the API
15
 
// function on the approrpiate stream object.
16
 
//---------------------------------------------------------------------------//
 
2
//
 
3
// Copyright (C) 2004  Andrew Ross
 
4
//
 
5
// This file is part of PLplot.
 
6
//
 
7
// PLplot is free software; you can redistribute it and/or modify
 
8
// it under the terms of the GNU General Library Public License as published
 
9
// by the Free Software Foundation; either version 2 of the License, or
 
10
// (at your option) any later version.
 
11
//
 
12
// PLplot is distributed in the hope that it will be useful,
 
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
// GNU Library General Public License for more details.
 
16
//
 
17
// You should have received a copy of the GNU Library General Public License
 
18
// along with PLplot; if not, write to the Free Software
 
19
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
20
//
 
21
// This class provides a more object orientated wrapper to the PLplot library
 
22
// for java. It is currently very similar to the C++ plstream class.
 
23
// Each instance of the class corresponds to a plplot stream. Calling a 
 
24
// method in the class will ensure the stream is correctly set before 
 
25
// calling the underlying API function.
 
26
//
17
27
 
18
28
package plplot.core;
19
29
 
20
 
public class PLStream {
21
 
 
22
 
// Arg parsing support.
23
 
    public final int PL_PARSE_PARTIAL      = 0x0000;
24
 
    public final int PL_PARSE_FULL         = 0x0001;
25
 
    public final int PL_PARSE_QUIET        = 0x0002;
26
 
    public final int PL_PARSE_NODELETE     = 0x0004;
27
 
 
28
 
    public final int PL_PARSE_SHOWALL      = 0x0008;
29
 
    public final int PL_PARSE_OVERRIDE     = 0x0010;
30
 
    public final int PL_PARSE_NOPROGRAM    = 0x0020;
31
 
    public final int PL_PARSE_NODASH       = 0x0040;
32
 
    public final int PL_PARSE_SKIP         = 0x0080;
33
 
 
34
 
    public native void ClearOpts();
35
 
    public native void ResetOpts();
36
 
// public native int MergeOpts(...);
37
 
    public native void SetUsage( String program_string, String usage_string );
38
 
// setopt()/SetOpt() ???
39
 
    public native int ParseOpts( String[] argv, int mode );
40
 
    public native void OptUsage();
41
 
 
42
 
// The PLplot core API function calls.
43
 
    public native void adv( int page );
44
 
 
45
 
    public native void arrows( float[] u, float[] v, float[] x, float[] y,
46
 
                               int n, float scale, float dx, float dy );
47
 
    public native void arrows( double[] u, double[] v, double[] x, double[] y,
48
 
                               int n, double scale, double dx, double dy );
49
 
 
50
 
    public native void axes( float x0, float y0,
51
 
                             String xopt, float xtick, int nxsub,
52
 
                             String yopt, float ytick, int nysub );
53
 
    public native void axes( double x0, double y0,
54
 
                             String xopt, double xtick, int nxsub,
55
 
                             String yopt, double ytick, int nysub );
56
 
 
57
 
    public native void bin( int nbin, float[] x, float[] y, int center );
58
 
    public native void bin( int nbin, double[] x, double[] y, int center );
59
 
 
60
 
    public native void bop();
61
 
 
62
 
    public native void box( String xopt, float xtick, int nxsub,
63
 
                            String yopt, float ytick, int nysub );
64
 
    public native void box( String xopt, double xtick, int nxsub,
65
 
                            String yopt, double ytick, int nysub );
66
 
 
67
 
    public native void box3(
68
 
        String xopt, String xlabel, float xtick, int nsubx,
69
 
        String yopt, String ylabel, float ytick, int nsuby,
70
 
        String zopt, String zlabel, float ztick, int nsubz );
71
 
    public native void box3(
72
 
        String xopt, String xlabel, double xtick, int nsubx,
73
 
        String yopt, String ylabel, double ytick, int nsuby,
74
 
        String zopt, String zlabel, double ztick, int nsubz );
75
 
 
76
 
    public native void col0( int icol );
77
 
 
78
 
    public native void col1( float col1 );
79
 
    public native void col1( double col1 );
80
 
 
81
 
// cont
82
 
// pltr1 variants.
83
 
    public native void cont( float[][] z, float[] clevel, float[] xg, float[] yg, int wrap );
84
 
    public native void cont( double[][] z, double[] clevel, double[] xg, double[] yg, int wrap );
85
 
 
86
 
// pltr2 variants.
87
 
    public native void cont( float[][] z, float[] clevel, float[][] xg, float[][] yg, int wrap );
88
 
    public native void cont( double[][] z, double[] clevel, double[][] xg, double[][] yg, int wrap );
89
 
 
90
 
// fcont
91
 
// cpstrm?
92
 
// did2pc
93
 
// dip2dc
94
 
 
95
 
    public native void end();
96
 
 
97
 
// end1?
98
 
 
99
 
    public native void env( float xmin, float xmax, float ymin, float ymax,
100
 
                            int just, int axis );
101
 
    public native void env( double xmin, double xmax, double ymin, double ymax,
102
 
                            int just, int axis );
103
 
 
104
 
    public native void eop();
105
 
 
106
 
    public native void errx( int n, float[] xmin, float[] xmax, float[] y );
107
 
    public native void errx( int n, double[] xmin, double[] xmax, double[] y );
108
 
 
109
 
    public native void erry( int n, float[] x, float[] ymin, float[] ymax );
110
 
    public native void erry( int n, double[] x, double[] ymin, double[] ymax );
111
 
 
112
 
    public native void famadv();
113
 
 
114
 
    public native void fill( int n, float[] x, float[] y );
115
 
    public native void fill( int n, double[] x, double[] y );
116
 
 
117
 
    public native void fill3( int n, float[] x, float[] y, float[] z );
118
 
    public native void fill3( int n, double[] x, double[] y, float[] z );
119
 
 
120
 
    public native void flush();
121
 
    public native void font( int fnt );
122
 
    public native void fontld( int fnt );
123
 
 
124
 
// gchr
125
 
// gcol0
126
 
// gcolbg
127
 
// gcompression
128
 
// gdev
129
 
// gdidev
130
 
// gdiori
131
 
// gdiplt
132
 
// gfam
133
 
// gfnam
134
 
// glevel
135
 
// gpage
136
 
// gra
137
 
// gspa
138
 
 
139
 
    public native int gstrm();
140
 
 
141
 
// gver
142
 
// gxax
143
 
// gyax
144
 
// gzax
145
 
 
146
 
    public native void hist( int n, float[] data, float datmin, float datmax,
147
 
                             int nbin, int oldwin );
148
 
    public native void hist( int n, double[] data, double datmin, double datmax,
149
 
                             int nbin, int oldwin );
150
 
 
151
 
    public native void init();
152
 
 
153
 
    public native void join( float x1, float y1, float x2, float y2 );
154
 
    public native void join( double x1, double y1, double x2, double y2 );
155
 
 
156
 
    public native void lab( String xlabel, String ylabel, String tlabel );
157
 
 
158
 
    public native void lightsource( float x, float y, float z );
159
 
    public native void lightsource( double x, double y, double z );
160
 
 
161
 
    public native void line( int n, float[] x, float[] y );
162
 
    public native void line( int n, double[] x, double[] y );
163
 
 
164
 
    public native void line3( int n, float[] x, float[] y, float[] z );
165
 
    public native void line3( int n, double[] x, double[] y, double[] z );
166
 
 
167
 
    public native void lsty( int lin );
168
 
 
169
 
// map
170
 
// meridians
171
 
 
172
 
    public final int DRAW_LINEX = 0x01; // draw lines parallel to the X axis
173
 
    public final int DRAW_LINEY = 0x02; // draw lines parallel to the Y axis
174
 
    public final int DRAW_LINEXY = DRAW_LINEX | DRAW_LINEY; // draw lines parallel to both the X and Y axis
175
 
    public final int MAG_COLOR = 0x04; // draw the mesh with a color dependent of the magnitude
176
 
 
177
 
    public native void mesh( float[] x, float[] y, float[][] z, int opt );
178
 
    public native void mesh( double[] x, double[] y, double[][] z, int opt );
179
 
 
180
 
// mkstrm?
181
 
 
182
 
    public native void mtex( String side,
183
 
                             float disp, float pos, float just,
184
 
                             String text);
185
 
    public native void mtex( String side,
186
 
                             double disp, double pos, double just,
187
 
                             String text);
188
 
 
189
 
// see the meaning of "opt" in mesh() above
190
 
 
191
 
    public native void plot3d( float[] x, float[] y, float[][] z,
192
 
                               int opt, int side );
193
 
    public native void plot3d( double[] x, double[] y, double[][] z,
194
 
                               int opt, int side );
195
 
 
196
 
 
197
 
    public final int SURF_CONT = 0x10; // draw contour plot at surface
198
 
    public final int BASE_CONT = 0x20; // draw contour plot at xy plane
199
 
    public final int DRAW_SIDES = 0x40; // draw sides
200
 
    public final int FACETED   = 0x80; // draw outline for each square that makes up the surface
201
 
    // also MAG_COLOR, defined above // draw the mesh with a color dependent of the magnitude
202
 
 
203
 
    public native void surf3d( float[] x, float[] y, float[][] z, int opt, float clev[] );
204
 
    public native void surf3d( double[] x, double[] y, double[][] z, int opt, double clev[] );
205
 
 
206
 
// pat
207
 
 
208
 
    public native void poin( int n, float[] x, float[] y, int code );
209
 
    public native void poin( int n, double[] x, double[] y, int code );
210
 
    public native void poin( float x, float y, int code ); // API addition
211
 
    public native void poin( double x, double y, int code ); // API addition
212
 
 
213
 
// poin3
214
 
// poly3
215
 
// plprec
216
 
 
217
 
    public native void psty( int patt );
218
 
 
219
 
    public native void ptex( float x, float y, float dx, float dy,
220
 
                             float just, String text );
221
 
    public native void ptex( double x, double y, double dx, double dy,
222
 
                             double just, String text );
223
 
 
224
 
// replot
225
 
// rgb
226
 
// rgb1
227
 
 
228
 
    public native void schr( float def, float scale );
229
 
    public native void schr( double def, double scale );
230
 
 
231
 
    public native void scmap0n( int ncol0 );
232
 
    public native void scmap1n( int ncol1 );
233
 
    public native void scmap0( int[] r, int[] g, int[] b, int ncol0 );
234
 
    public native void scmap1( int[] r, int[] g, int[] b, int ncol1 );
235
 
    public native void scmap1l( int itype, int npts, float[] i, float[] c1,
236
 
                                float[] c2, float[] c3, int[] rev );
237
 
    public native void scmap1l( int itype, int npts, double[] i, double[] c1,
238
 
                                double[] c2, double[] c3, int[] rev );
239
 
    public native void scol0( int icol0, int r, int g, int b );
240
 
    public native void scolbg( int r, int g, int b );
241
 
    public native void scolor( int color );
242
 
    public native void scompression( int compression );
243
 
 
244
 
// /* Set the device (keyword) name */
245
 
 
246
 
// void
247
 
// c_plsdev(const char *devname);
248
 
 
249
 
// /* Set window into device space using margin, aspect ratio, and */
250
 
// /* justification */
251
 
 
252
 
// void
253
 
// c_plsdidev(PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy);
254
 
 
255
 
// /* Set up transformation from metafile coordinates. */
256
 
 
257
 
// void
258
 
// c_plsdimap(PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax,
259
 
//         PLFLT dimxpmm, PLFLT dimypmm);
260
 
 
261
 
// /* Set plot orientation, specifying rotation in units of pi/2. */
262
 
 
263
 
// void
264
 
// c_plsdiori(PLFLT rot);
265
 
 
266
 
// /* Set window into plot space */
267
 
 
268
 
// void
269
 
// c_plsdiplt(PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax);
270
 
 
271
 
// /* Set window into plot space incrementally (zoom) */
272
 
 
273
 
// void
274
 
// c_plsdiplz(PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax);
275
 
 
276
 
// /* Set the escape character for text strings. */
277
 
 
278
 
// void
279
 
// c_plsesc(char esc);
280
 
 
281
 
    public native void setcontlabelparam( float offset, float size, float spacing, int active );
282
 
    public native void setcontlabelparam( double offset, double size, double spacing, int active );
283
 
 
284
 
    public native void setcontlabelformat( int lexp, int sigdig );
285
 
 
286
 
// /* Set family file parameters */
287
 
 
288
 
// void
289
 
// c_plsfam(PLINT fam, PLINT num, PLINT bmax);
290
 
 
291
 
// /* Set the output file name. */
292
 
 
293
 
// void
294
 
// c_plsfnam(const char *fnam);
295
 
 
296
 
/* Shade region. */
297
 
 
298
 
// multi region shade
299
 
    public native void shades( float[][] a,
300
 
                               float left, float right, float bottom, float top,
301
 
                               float[] clevel, float fill_width,
302
 
                               float cont_color, float cont_width,
303
 
                               int rect );
304
 
    public native void shades( double[][] a,
305
 
                               double left, double right, double bottom, double top,
306
 
                               double[] clevel, double fill_width,
307
 
                               double cont_color, double cont_width,
308
 
                               int rect );
 
30
import java.io.*;
 
31
 
 
32
public class PLStream implements plplotjavacConstants {
 
33
 
 
34
// Class data.
 
35
    int stream_id = -1;
 
36
 
 
37
    static int next_stream = 0;
 
38
    static int active_streams = 0;
 
39
 
 
40
// Constructor
 
41
public PLStream() {
 
42
    // If this is the first instance of the class we
 
43
    // need to load the C part of the bindings
 
44
    if (active_streams == 0) {
 
45
        openlib();
 
46
    }
309
47
    
310
 
// pltr1
311
 
    public native void shades( float[][] a,
312
 
                               float left, float right, float bottom, float top,
313
 
                               float[] clevel, float fill_width,
314
 
                               float cont_color, float cont_width,
315
 
                               int rect, float[] xg, float[] yg, int wrap );
316
 
    public native void shades( double[][] a,
317
 
                               double left, double right, double bottom, double top,
318
 
                               double[] clevel, double fill_width,
319
 
                               double cont_color, double cont_width,
320
 
                               int rect, double[] xg, double[] yg, int wrap );
321
 
 
322
 
// pltr2
323
 
    public native void shades( float[][] a,
324
 
                               float left, float right, float bottom, float top,
325
 
                               float[] clevel, float fill_width,
326
 
                               float cont_color, float cont_width,
327
 
                               int rect, float[][] xg, float[][] yg, int wrap );
328
 
    public native void shades( double[][] a,
329
 
                               double left, double right, double bottom, double top,
330
 
                               double[] clevel, double fill_width,
331
 
                               double cont_color, double cont_width,
332
 
                               int rect, double[][] xg, double[][] yg, int wrap );
333
 
 
334
 
// single region shade
335
 
    public native void shade( float[][] a,
336
 
                              float left, float right, float bottom, float top,
337
 
                              float shade_min, float shade_max,
338
 
                              int sh_cmap, float sh_color, int sh_width,
339
 
                              int min_color, int min_width,
340
 
                              int max_color, int max_width,
341
 
                              int rect );
342
 
    public native void shade( double[][] a,
343
 
                              double left, double right, double bottom, double top,
344
 
                              double shade_min, double shade_max,
345
 
                              int sh_cmap, double sh_color, int sh_width,
346
 
                              int min_color, int min_width,
347
 
                              int max_color, int max_width,
348
 
                              int rect );
349
 
 
350
 
// pltr1
351
 
    public native void shade( float[][] a,
352
 
                              float left, float right, float bottom, float top,
353
 
                              float shade_min, float shade_max,
354
 
                              int sh_cmap, float sh_color, int sh_width,
355
 
                              int min_color, int min_width,
356
 
                              int max_color, int max_width,
357
 
                              int rect, float[] xg, float[] yg, int wrap );
358
 
    public native void shade( double[][] a,
359
 
                              double left, double right, double bottom, double top,
360
 
                              double shade_min, double shade_max,
361
 
                              int sh_cmap, double sh_color, int sh_width,
362
 
                              int min_color, int min_width,
363
 
                              int max_color, int max_width,
364
 
                              int rect, double[] xg, double[] yg, int wrap );
365
 
 
366
 
// pltr2
367
 
    public native void shade( float[][] a,
368
 
                              float left, float right, float bottom, float top,
369
 
                              float shade_min, float shade_max,
370
 
                              int sh_cmap, float sh_color, int sh_width,
371
 
                              int min_color, int min_width,
372
 
                              int max_color, int max_width,
373
 
                              int rect, float[][] xg, float[][] yg, int wrap );
374
 
    public native void shade( double[][] a,
375
 
                              double left, double right, double bottom, double top,
376
 
                              double shade_min, double shade_max,
377
 
                              int sh_cmap, double sh_color, int sh_width,
378
 
                              int min_color, int min_width,
379
 
                              int max_color, int max_width,
380
 
                              int rect, double[][] xg, double[][] yg, int wrap );
381
 
 
382
 
// smaj
383
 
// smin
384
 
// sori
385
 
 
386
 
// void
387
 
// c_plspage(PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng,
388
 
//        PLINT xoff, PLINT yoff);
389
 
 
390
 
    public native void spause( int pause );
391
 
 
392
 
// sstrm?
393
 
 
394
 
    public native void ssub( int nx, int ny );
395
 
 
396
 
// ssym
397
 
// star
398
 
// start
399
 
// stripc
400
 
// stripa
401
 
// stripd
402
 
// image
403
 
 
404
 
    public native void styl( int nms, int mark, int space );
405
 
 
406
 
    public native void svpa( float xmin, float xmax, float ymin, float ymax );
407
 
    public native void svpa( double xmin, double xmax, double ymin, double ymax );
408
 
 
409
 
    public native void sxax( int digmax, int digits );
410
 
 
411
 
// sxwin
412
 
 
413
 
    public native void syax( int digmax, int digits );
414
 
 
415
 
    public native void sym( int n, float[] x, float[] y, int code );
416
 
    public native void sym( int n, double[] x, double[] y, int code );
417
 
    public native void sym( float x, float y, int code ); // API addition
418
 
    public native void sym( double x, double y, int code ); // API addition
419
 
 
420
 
    public native void szax( int digmax, int digits );
421
 
    public native void text();
422
 
 
423
 
    public native void vasp( float aspect );
424
 
    public native void vasp( double aspect );
425
 
 
426
 
    public native void vpas( float xmin, float xmax, float ymin, float ymax, float aspect );
427
 
    public native void vpas( double xmin, double xmax, double ymin, double ymax, double aspect );
428
 
 
429
 
    public native void vpor( float xmin, float xmax, float ymin, float ymax );
430
 
    public native void vpor( double xmin, double xmax, double ymin, double ymax );
431
 
 
432
 
    public native void vsta();
433
 
 
434
 
    public native void w3d( float basex, float basey, float height, float xmin0,
435
 
                            float xmax0, float ymin0, float ymax0, float zmin0,
436
 
                            float zmax0, float alt, float az);
437
 
    public native void w3d( double basex, double basey, double height, double xmin0,
438
 
                            double xmax0, double ymin0, double ymax0, double zmin0,
439
 
                            double zmax0, double alt, double az);
440
 
 
441
 
    public native void wid( int width );
442
 
 
443
 
    public native void wind( float xmin, float xmax, float ymin, float ymax );
444
 
    public native void wind( double xmin, double xmax, double ymin, double ymax );
445
 
 
446
 
// Methods needed for the implementation of PLStream, but not suitable for
447
 
// the public interface.
448
 
    native int mkstrm();
449
 
 
450
 
// Static code block to get the PLplot dynamic library loaded in.
451
 
    static {
452
 
        System.loadLibrary( plplot.core.config.libname );
453
 
    }
454
 
 
455
 
// Class data.
456
 
    int stream_id;
457
 
 
458
 
// Now comes stuff we need done in Java.
459
 
    public PLStream() 
460
 
    {
461
 
        stream_id = mkstrm();
462
 
    }
463
 
 
464
 
    public int get_stream_id() { return stream_id; }
465
 
}
466
 
 
467
 
//---------------------------------------------------------------------------//
468
 
//                              End of PLStream.java
469
 
//---------------------------------------------------------------------------//
470
 
 
 
48
    stream_id = next_stream;
 
49
    active_streams++;
 
50
    next_stream++;
 
51
 
 
52
    // Create stream and check it worked ok.
 
53
    if(set_stream() == -1) {
 
54
        System.err.println("Error creating plplot stream");
 
55
        stream_id = -1;
 
56
        active_streams--;
 
57
        next_stream--;
 
58
    }
 
59
}
 
60
 
 
61
// Ensure this is the current stream
 
62
public int set_stream() {
 
63
    if ((stream_id == -1) || (active_streams == 0)) {
 
64
        System.err.println("Error: This stream is not active");
 
65
        return -1;
 
66
    }
 
67
    plplotjavac.plsstrm(stream_id);
 
68
    return 0;
 
69
}
 
70
 
 
71
// Method to load the native C part of the java wrapper
 
72
public void openlib() {
 
73
    File libname = null;
 
74
 
 
75
    try {
 
76
        String libdir = System.getProperty("plplot.libdir");
 
77
        libname = new File(libdir+File.separatorChar+plplot.core.config.libname);
 
78
        if (! libname.exists()) {
 
79
            libname = null;
 
80
        }
 
81
     } catch ( Exception e) {
 
82
     }
 
83
     if (libname == null) {
 
84
         libname = new File(plplot.core.config.libdir+File.separatorChar+plplot.core.config.libname);
 
85
         if ( ! libname.exists() ) {
 
86
            libname = null;
 
87
         }
 
88
     }
 
89
     if (libname != null) {
 
90
         try {
 
91
            System.load( libname.getAbsolutePath() );
 
92
         } catch (UnsatisfiedLinkError e) {
 
93
            System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
 
94
            System.exit(1);
 
95
         }
 
96
     } 
 
97
     else {
 
98
         System.err.println("Unable to find native code library.\n");
 
99
         System.exit(1);
 
100
     }
 
101
 
 
102
}
 
103
 
 
104
// The following are wrappers to the C API methods, or their derivatives
 
105
 
 
106
public void setcontlabelformat(int lexp, int sigdig) {
 
107
    if (set_stream() == -1) return;
 
108
    plplotjavac.pl_setcontlabelformat(lexp, sigdig);
 
109
}
 
110
 
 
111
public void setcontlabelparam(double offset, double size, double spacing, int active) {
 
112
    if (set_stream() == -1) return;
 
113
    plplotjavac.pl_setcontlabelparam(offset, size, spacing, active);
 
114
}
 
115
 
 
116
public void adv(int page) {
 
117
    if (set_stream() == -1) return;
 
118
    plplotjavac.pladv(page);
 
119
}
 
120
 
 
121
public void axes(double x0, double y0, String xopt, double xtick, int nxsub, 
 
122
                 String yopt, double ytick, int nysub) {
 
123
    if (set_stream() == -1) return;
 
124
    plplotjavac.plaxes(x0, y0, xopt, xtick, nxsub, yopt, ytick, nysub);
 
125
}
 
126
 
 
127
public void bin(double[] x, double[] y, int center) {
 
128
    if (set_stream() == -1) return;
 
129
    plplotjavac.plbin(x, y, center);
 
130
}
 
131
 
 
132
public void bop() {
 
133
    if (set_stream() == -1) return;
 
134
    plplotjavac.plbop();
 
135
}
 
136
 
 
137
public void box(String xopt, double xtick, int nxsub,
 
138
                String yopt, double ytick, int nysub) {
 
139
    if (set_stream() == -1) return;
 
140
    plplotjavac.plbox(xopt, xtick, nxsub, yopt, ytick, nysub);
 
141
}
 
142
 
 
143
public void box3(String xopt, String xlabel, double xtick, int nsubx,
 
144
                 String yopt, String ylabel, double ytick, int nsuby,
 
145
                 String zopt, String zlabel, double ztick, int nsubz) {
 
146
    if (set_stream() == -1) return;
 
147
    plplotjavac.plbox3(xopt, xlabel, xtick, nsubx, yopt, ylabel, ytick, nsuby,
 
148
                    zopt, zlabel, ztick, nsubz);
 
149
}
 
150
 
 
151
public void calc_world(double rx, double ry, double[] wx, double[] wy, int[] window) {
 
152
    if (set_stream() == -1) return;
 
153
    plplotjavac.plcalc_world(rx, ry, wx, wy, window);
 
154
}
 
155
 
 
156
public void clear() {
 
157
    if (set_stream() == -1) return;
 
158
    plplotjavac.plclear();
 
159
}
 
160
 
 
161
public void col0(int icol0) {
 
162
    if (set_stream() == -1) return;
 
163
    plplotjavac.plcol0(icol0);
 
164
}
 
165
 
 
166
public void col1(double col1) {
 
167
    if (set_stream() == -1) return;
 
168
    plplotjavac.plcol1(col1);
 
169
}
 
170
 
 
171
public void cont(double[][] f, int kx, int lx, int ky, int ly, 
 
172
                double[] clevel, double[][] pltr, double[][] OBJECT_DATA) {
 
173
    if (set_stream() == -1) return;
 
174
    plplotjavac.plcont(f, kx, lx, ky, ly, clevel, pltr, OBJECT_DATA);
 
175
}
 
176
 
 
177
public void cpstrm(int iplsr, boolean flags) {
 
178
    if (set_stream() == -1) return;
 
179
    plplotjavac.plcpstrm(iplsr, flags);
 
180
}
 
181
 
 
182
// The end / end1 functions have extra code in to keep track of the
 
183
// stream references in the class. 
 
184
public void end() {
 
185
    if (set_stream() == -1) return;
 
186
    plplotjavac.plend();
 
187
    active_streams = 0;
 
188
    stream_id = -1;
 
189
}
 
190
 
 
191
public void end1() {
 
192
    if (set_stream() == -1) return;
 
193
    plplotjavac.plend1();
 
194
 
 
195
    active_streams--;
 
196
    stream_id = -1;
 
197
}
 
198
 
 
199
public void env(double xmin, double xmax, double ymin, double ymax, int just, int axis) {
 
200
    if (set_stream() == -1) return;
 
201
    plplotjavac.plenv(xmin, xmax, ymin, ymax, just, axis);
 
202
}
 
203
 
 
204
public void eop() {
 
205
    if (set_stream() == -1) return;
 
206
    plplotjavac.pleop();
 
207
}
 
208
 
 
209
public void errx(double[] xmin, double[] xmax, double[] y) {
 
210
    if (set_stream() == -1) return;
 
211
    plplotjavac.plerrx(xmin, xmax, y);
 
212
}
 
213
 
 
214
public void erry(double[] x, double[] ymin, double[] ymax) {
 
215
    if (set_stream() == -1) return;
 
216
    plplotjavac.plerry(x, ymin, ymax);
 
217
}
 
218
 
 
219
public void famadv() {
 
220
    if (set_stream() == -1) return;
 
221
    plplotjavac.plfamadv();
 
222
}
 
223
 
 
224
public void fill(double[] x, double[] y) {
 
225
    if (set_stream() == -1) return;
 
226
    plplotjavac.plfill(x, y);
 
227
}
 
228
 
 
229
public void fill3(double[] x, double[] y, double[] z) {
 
230
    if (set_stream() == -1) return;
 
231
    plplotjavac.plfill3(x, y, z);
 
232
}
 
233
 
 
234
public void flush() {
 
235
    if (set_stream() == -1) return;
 
236
    plplotjavac.plflush();
 
237
}
 
238
 
 
239
public void font(int ifont) {
 
240
    if (set_stream() == -1) return;
 
241
    plplotjavac.plfont(ifont);
 
242
}
 
243
 
 
244
public void fontld(int fnt) {
 
245
    if (set_stream() == -1) return;
 
246
    plplotjavac.plfontld(fnt);
 
247
}
 
248
 
 
249
public void gchr(double[] p_def, double[] p_ht) {
 
250
    if (set_stream() == -1) return;
 
251
    plplotjavac.plgchr(p_def, p_ht);
 
252
}
 
253
 
 
254
public void gcol0(int icol0, int[] r, int[] g, int[] b) {
 
255
    if (set_stream() == -1) return;
 
256
    plplotjavac.plgcol0(icol0, r, g, b);
 
257
}
 
258
 
 
259
public void gcolbg(int[] r, int[] g, int[] b) {
 
260
    if (set_stream() == -1) return;
 
261
    plplotjavac.plgcolbg(r, g, b);
 
262
}
 
263
 
 
264
public void gcompression(int[] compression) {
 
265
    if (set_stream() == -1) return;
 
266
    plplotjavac.plgcompression(compression);
 
267
}
 
268
 
 
269
public void gdev(StringBuffer dev) {
 
270
    if (set_stream() == -1) return;
 
271
    plplotjavac.plgdev(dev);
 
272
}
 
273
 
 
274
public void gdidev(double[] mar, double[] aspect, double[] jx, double[] jy) {
 
275
    if (set_stream() == -1) return;
 
276
    plplotjavac.plgdidev(mar, aspect, jx, jy);
 
277
}
 
278
 
 
279
public void gdiori(double[] rot) {
 
280
    if (set_stream() == -1) return;
 
281
    plplotjavac.plgdiori(rot);
 
282
}
 
283
 
 
284
public void gdiplt(double[] xmin, double[] xmax, double[] ymin, double[] ymax) {
 
285
    if (set_stream() == -1) return;
 
286
    plplotjavac.plgdiplt(xmin, xmax, ymin, ymax);
 
287
}
 
288
 
 
289
public void gfam(int[] fam, int[] num, int[]  bmax) {
 
290
    if (set_stream() == -1) return;
 
291
    plplotjavac.plgfam(fam, num, bmax);
 
292
}
 
293
 
 
294
public void gfnam(StringBuffer fnam) {
 
295
    if (set_stream() == -1) return;
 
296
    plplotjavac.plgfnam(fnam);
 
297
}
 
298
 
 
299
public void glevel(int[] p_level) {
 
300
    if (set_stream() == -1) return;
 
301
    plplotjavac.plglevel(p_level);
 
302
}
 
303
 
 
304
public void gpage(double[] xp, double[] yp, int[] xleng, int[] yleng, int[] xoff, int[] yoff) {
 
305
    if (set_stream() == -1) return;
 
306
    plplotjavac.plgpage(xp, yp, xleng, yleng, xoff, yoff);
 
307
}
 
308
 
 
309
public void gra() {
 
310
    if (set_stream() == -1) return;
 
311
    plplotjavac.plgra();
 
312
}
 
313
 
 
314
public void gspa(double[] xmin, double[] xmax, double[] ymin, double[] ymax) {
 
315
    if (set_stream() == -1) return;
 
316
    plplotjavac.plgspa(xmin, xmax, ymin, ymax);
 
317
}
 
318
 
 
319
// Note: The user should never need this in with this class
 
320
// since the stream is encapsulated in the class.
 
321
//public void gstrm(int[] p_strm) {
 
322
//    if (set_stream() == -1) return;
 
323
//    plplotjavac.plgstrm(p_strm);
 
324
//}
 
325
 
 
326
public void gver(StringBuffer ver) {
 
327
    if (set_stream() == -1) return;
 
328
    plplotjavac.plgver(ver);
 
329
}
 
330
 
 
331
public void gvpd(double[] xmin, double[] xmax, double[] ymin, double[] ymax) {
 
332
    if (set_stream() == -1) return;
 
333
    plplotjavac.plgvpd(xmin, xmax, ymin, ymax);
 
334
}
 
335
 
 
336
public void gvpw(double[] xmin, double[] xmax, double[] ymin, double[] ymax) {
 
337
    if (set_stream() == -1) return;
 
338
    plplotjavac.plgvpw(xmin, xmax, ymin, ymax);
 
339
}
 
340
 
 
341
public void gxax(int[] digmax, int[] digits) {
 
342
    if (set_stream() == -1) return;
 
343
    plplotjavac.plgxax(digmax, digits);
 
344
}
 
345
 
 
346
public void gyax(int[] digmax, int[] digits) {
 
347
    if (set_stream() == -1) return;
 
348
    plplotjavac.plgyax(digmax, digits);
 
349
}
 
350
 
 
351
public void gzax(int[] digmax, int[] digits) {
 
352
    if (set_stream() == -1) return;
 
353
    plplotjavac.plgzax(digmax, digits);
 
354
}
 
355
 
 
356
public void hist(double[] data, double datmin, double datmax, int nbin, int oldwin) {
 
357
    if (set_stream() == -1) return;
 
358
    plplotjavac.plhist(data, datmin, datmax, nbin, oldwin);
 
359
}
 
360
 
 
361
public void hls(double h, double l, double s) {
 
362
    if (set_stream() == -1) return;
 
363
    plplotjavac.plhls(h, l, s);
 
364
}
 
365
 
 
366
public void init() {
 
367
    if (set_stream() == -1) return;
 
368
    plplotjavac.plinit();
 
369
}
 
370
 
 
371
public void join(double x1, double y1, double x2, double y2) {
 
372
    if (set_stream() == -1) return;
 
373
    plplotjavac.pljoin(x1, y1, x2, y2);
 
374
}
 
375
 
 
376
public void lab(String xlabel, String ylabel, String tlabel) {
 
377
    if (set_stream() == -1) return;
 
378
    plplotjavac.pllab(xlabel, ylabel, tlabel);
 
379
}
 
380
 
 
381
public void lightsource(double x, double y, double z) {
 
382
    if (set_stream() == -1) return;
 
383
    plplotjavac.pllightsource(x, y, z);
 
384
}
 
385
 
 
386
public void line(double[] x, double[] y) {
 
387
    if (set_stream() == -1) return;
 
388
    plplotjavac.plline(x, y);
 
389
}
 
390
 
 
391
public void line3(double[] x, double[] y, double[] z) {
 
392
    if (set_stream() == -1) return;
 
393
    plplotjavac.plline3(x, y, z);
 
394
}
 
395
 
 
396
public void lsty(int lin) {
 
397
    if (set_stream() == -1) return;
 
398
    plplotjavac.pllsty(lin);
 
399
}
 
400
 
 
401
public void mesh(double[] x, double[] y, double[][] z, int opt) {
 
402
    if (set_stream() == -1) return;
 
403
    plplotjavac.plmesh(x, y, z, opt);
 
404
}
 
405
 
 
406
public void meshc(double[] x, double[] y, double[][] z, int opt, double[] clevel) {
 
407
    if (set_stream() == -1) return;
 
408
    plplotjavac.plmeshc(x, y, z, opt,clevel);
 
409
}
 
410
 
 
411
// Don't need this in the OO approach - create a new object instead.
 
412
//public void mkstrm(int[] OUTPUT) {
 
413
//    if (set_stream() == -1) return;
 
414
//    plplotjavac.plmkstrm(int[] OUTPUT);
 
415
//}
 
416
 
 
417
public void mtex(String side, double disp, double pos, double just, String text) {
 
418
    if (set_stream() == -1) return;
 
419
    plplotjavac.plmtex(side, disp, pos, just, text);
 
420
}
 
421
 
 
422
public void plot3d(double[] x, double[] y, double[][] z, int opt, boolean side) {
 
423
    if (set_stream() == -1) return;
 
424
    plplotjavac.plot3d(x, y, z, opt, side);
 
425
}
 
426
 
 
427
public void plot3dc(double[] x, double[] y, double[][] z, int opt, double[] clevel) {
 
428
    if (set_stream() == -1) return;
 
429
    plplotjavac.plot3dc(x, y, z, opt, clevel);
 
430
}
 
431
 
 
432
public void plot3dcl(double[] x, double[] y, double[][] z, int opt, 
 
433
                double[] clevel, int ixstart, int[] indexymin, int[] indexymax) {
 
434
    if (set_stream() == -1) return;
 
435
    plplotjavac.plot3dcl(x, y, z, opt, clevel, ixstart, indexymin, indexymax);
 
436
}
 
437
 
 
438
public void surf3d(double[] x, double[] y, double[][] z, int opt, double[] clevel) {
 
439
    if (set_stream() == -1) return;
 
440
    plplotjavac.plsurf3d(x, y, z, opt, clevel);
 
441
}
 
442
 
 
443
public void surf3dl(double[] x, double[] y, double[][] z, int opt, 
 
444
                double[] clevel, int ixstart, int[] indexymin, int[] indexymax) {
 
445
    if (set_stream() == -1) return;
 
446
    plplotjavac.plsurf3dl(x, y, z, opt, clevel, ixstart, indexymin, indexymax);
 
447
}
 
448
 
 
449
public void parseopts(String[] argv, int mode) {
 
450
    if (set_stream() == -1) return;
 
451
    plplotjavac.plparseopts(argv, mode);
 
452
}
 
453
 
 
454
public void pat(int[] inc, int[] del) {
 
455
    if (set_stream() == -1) return;
 
456
    plplotjavac.plpat(inc, del);
 
457
}
 
458
 
 
459
public void poin(double[] x, double[] y, int code) {
 
460
    if (set_stream() == -1) return;
 
461
    plplotjavac.plpoin(x, y, code);
 
462
}
 
463
 
 
464
public void poin3(double[] x, double[] y, double[] z, int code) {
 
465
    if (set_stream() == -1) return;
 
466
    plplotjavac.plpoin3(x, y, z, code);
 
467
}
 
468
 
 
469
public void poly3(double[] x, double[] y, double[] z, boolean[] draw, boolean ifcc) {
 
470
    if (set_stream() == -1) return;
 
471
    plplotjavac.plpoly3(x, y, z, draw, ifcc);
 
472
}
 
473
 
 
474
public void prec(int setp, int prec) {
 
475
    if (set_stream() == -1) return;
 
476
    plplotjavac.plprec(setp, prec);
 
477
}
 
478
 
 
479
public void psty(int patt) {
 
480
    if (set_stream() == -1) return;
 
481
    plplotjavac.plpsty(patt);
 
482
}
 
483
 
 
484
public void ptex(double x, double y, double dx, double dy, double just, String text) {
 
485
    if (set_stream() == -1) return;
 
486
    plplotjavac.plptex(x, y, dx, dy, just, text);
 
487
}
 
488
 
 
489
public void replot() {
 
490
    if (set_stream() == -1) return;
 
491
    plplotjavac.plreplot();
 
492
}
 
493
 
 
494
public void schr(double def, double scale) {
 
495
    if (set_stream() == -1) return;
 
496
    plplotjavac.plschr(def, scale);
 
497
}
 
498
 
 
499
public void scmap0(int[] r, int[] g, int[] b) {
 
500
    if (set_stream() == -1) return;
 
501
    plplotjavac.plscmap0(r, g, b);
 
502
}
 
503
 
 
504
public void scmap0n(int ncol0) {
 
505
    if (set_stream() == -1) return;
 
506
    plplotjavac.plscmap0n(ncol0);
 
507
}
 
508
 
 
509
public void scmap1(int[] r, int[] g, int[] b) {
 
510
    if (set_stream() == -1) return;
 
511
    plplotjavac.plscmap1(r, g, b);
 
512
}
 
513
 
 
514
public void scmap1l(boolean itype, double[] intensity, double[] coord1, 
 
515
                double[] coord2, double[] coord3, boolean[] rev) {
 
516
    if (set_stream() == -1) return;
 
517
    plplotjavac.plscmap1l(itype, intensity, coord1, coord2, coord3, rev);
 
518
}
 
519
 
 
520
public void scmap1n(int ncol1) {
 
521
    if (set_stream() == -1) return;
 
522
    plplotjavac.plscmap1n(ncol1);
 
523
}
 
524
 
 
525
public void scol0(int icol0, int r, int g, int b) {
 
526
    if (set_stream() == -1) return;
 
527
    plplotjavac.plscol0(icol0, r, g, b);
 
528
}
 
529
 
 
530
public void scolbg(int r, int g, int b) {
 
531
    if (set_stream() == -1) return;
 
532
    plplotjavac.plscolbg(r, g, b);
 
533
}
 
534
 
 
535
public void scolor(int color) {
 
536
    if (set_stream() == -1) return;
 
537
    plplotjavac.plscolor(color);
 
538
}
 
539
 
 
540
public void scompression(int compression) {
 
541
    if (set_stream() == -1) return;
 
542
    plplotjavac.plscompression(compression);
 
543
}
 
544
 
 
545
public void sdev(String devname) {
 
546
    if (set_stream() == -1) return;
 
547
    plplotjavac.plsdev(devname);
 
548
}
 
549
 
 
550
public void sdidev(double mar, double aspect, double jx, double jy) {
 
551
    if (set_stream() == -1) return;
 
552
    plplotjavac.plsdidev(mar, aspect, jx, jy);
 
553
}
 
554
 
 
555
public void sdimap(int dimxmin, int dimxmax, int dimymin, int dimymax, 
 
556
                double dimxpmm, double dimypmm) {
 
557
    if (set_stream() == -1) return;
 
558
    plplotjavac.plsdimap(dimxmin, dimxmax, dimymin, dimymax, dimxpmm, dimypmm);
 
559
}
 
560
 
 
561
public void sdiori(double rot) {
 
562
    if (set_stream() == -1) return;
 
563
    plplotjavac.plsdiori(rot);
 
564
}
 
565
 
 
566
public void sdiplt(double xmin, double ymin, double xmax, double ymax) {
 
567
    if (set_stream() == -1) return;
 
568
    plplotjavac.plsdiplt(xmin, ymin, xmax, ymax);
 
569
}
 
570
 
 
571
public void sdiplz(double xmin, double ymin, double xmax, double ymax) {
 
572
    if (set_stream() == -1) return;
 
573
    plplotjavac.plsdiplz(xmin, ymin, xmax, ymax);
 
574
}
 
575
 
 
576
public void sesc(char esc) {
 
577
    if (set_stream() == -1) return;
 
578
    plplotjavac.plsesc(esc);
 
579
}
 
580
 
 
581
public void setopt(String opt, String optarg) {
 
582
    if (set_stream() == -1) return;
 
583
    plplotjavac.plsetopt(opt, optarg);
 
584
}
 
585
 
 
586
public void sfam(int fam, int num, int bmax) {
 
587
    if (set_stream() == -1) return;
 
588
    plplotjavac.plsfam(fam, num, bmax);
 
589
}
 
590
 
 
591
public void sfnam(String fnam) {
 
592
    if (set_stream() == -1) return;
 
593
    plplotjavac.plsfnam(fnam);
 
594
}
 
595
 
 
596
public void shades( double[][] a, double xmin, double xmax, double ymin,
 
597
                double ymax, double[] clevel, int fill_width, int cont_color,
 
598
                int cont_width, boolean rectangular, 
 
599
                double[][] pltr, double[][] OBJECT_DATA) {
 
600
    if (set_stream() == -1) return;
 
601
    plplotjavac.plshades( a, xmin, xmax, ymin, ymax, clevel, fill_width,
 
602
                    cont_color, cont_width, rectangular, pltr, OBJECT_DATA);
 
603
}
 
604
 
 
605
public void shade(double[][] a, double left, double right, double bottom,
 
606
                double top, double shade_min, double shade_max, int sh_cmap,
 
607
                double sh_color, int sh_width, int min_color, int min_width, 
 
608
                int max_color, int max_width, boolean rectangular, 
 
609
                double[][] pltr, double[][] OBJECT_DATA) {
 
610
    if (set_stream() == -1) return;
 
611
    plplotjavac.plshade(a, left, right, bottom, top, shade_min, shade_max,
 
612
                    sh_cmap, sh_color, sh_width, min_color, min_width, 
 
613
                    max_color, max_width, rectangular, pltr, OBJECT_DATA);
 
614
}
 
615
 
 
616
public void smaj(double def, double scale) {
 
617
    if (set_stream() == -1) return;
 
618
    plplotjavac.plsmaj(def, scale);
 
619
}
 
620
 
 
621
public void smin(double def, double scale) {
 
622
    if (set_stream() == -1) return;
 
623
    plplotjavac.plsmin(def, scale);
 
624
}
 
625
 
 
626
public void sori(int ori) {
 
627
    if (set_stream() == -1) return;
 
628
    plplotjavac.plsori(ori);
 
629
}
 
630
 
 
631
public void spage(double xp, double yp, int xleng, int yleng, int xoff, int yoff) {
 
632
    if (set_stream() == -1) return;
 
633
    plplotjavac.plspage(xp, yp, xleng, yleng, xoff, yoff);
 
634
}
 
635
 
 
636
public void spause(boolean pause) {
 
637
    if (set_stream() == -1) return;
 
638
    plplotjavac.plspause(pause);
 
639
}
 
640
 
 
641
public void sstrm(int strm) {
 
642
    if (set_stream() == -1) return;
 
643
    plplotjavac.plsstrm(strm);
 
644
}
 
645
 
 
646
public void ssub(int nx, int ny) {
 
647
    if (set_stream() == -1) return;
 
648
    plplotjavac.plssub(nx, ny);
 
649
}
 
650
 
 
651
public void ssym(double def, double scale) {
 
652
    if (set_stream() == -1) return;
 
653
    plplotjavac.plssym(def, scale);
 
654
}
 
655
 
 
656
public void star(int nx, int ny) {
 
657
    if (set_stream() == -1) return;
 
658
    plplotjavac.plstar(nx, ny);
 
659
}
 
660
 
 
661
public void start(String devname, int nx, int ny) {
 
662
    if (set_stream() == -1) return;
 
663
    plplotjavac.plstart(devname, nx, ny);
 
664
}
 
665
 
 
666
public void stripa(int id, int pen, double x, double y) {
 
667
    if (set_stream() == -1) return;
 
668
    plplotjavac.plstripa(id, pen, x, y);
 
669
}
 
670
 
 
671
public void stripc(int[] id, String xspec, String yspec, 
 
672
                double xmin, double xmax, double xjump, 
 
673
                double ymin, double ymax, double xlpos, double ylpos, 
 
674
                boolean y_ascl, boolean acc, int colbox, int collab, 
 
675
                int[] colline, int[] styline, SWIGTYPE_p_p_char legline, 
 
676
                String labx, String laby, String labtop) {
 
677
    if (set_stream() == -1) return;
 
678
    plplotjavac.plstripc(id, xspec, yspec, xmin, xmax, xjump, ymin, ymax, 
 
679
                    xlpos, ylpos, y_ascl, acc, colbox, collab, colline,
 
680
                    styline, legline, labx, laby, labtop);
 
681
}
 
682
 
 
683
public void stripd(int id) {
 
684
    if (set_stream() == -1) return;
 
685
    plplotjavac.plstripd(id);
 
686
}
 
687
 
 
688
public void styl(int[] mark, int[] space) {
 
689
    if (set_stream() == -1) return;
 
690
    plplotjavac.plstyl(mark, space);
 
691
}
 
692
 
 
693
public void svect(double[] arrow_x, double[] arrow_y, boolean fill) {
 
694
    if (set_stream() == -1) return;
 
695
    plplotjavac.plsvect(arrow_x, arrow_y, fill);
 
696
}
 
697
 
 
698
public void svpa(double xmin, double xmax, double ymin, double ymax) {
 
699
    if (set_stream() == -1) return;
 
700
    plplotjavac.plsvpa(xmin, xmax, ymin, ymax);
 
701
}
 
702
 
 
703
public void sxax(int digmax, int digits) {
 
704
    if (set_stream() == -1) return;
 
705
    plplotjavac.plsxax(digmax, digits);
 
706
}
 
707
 
 
708
public void syax(int digmax, int digits) {
 
709
    if (set_stream() == -1) return;
 
710
    plplotjavac.plsyax(digmax, digits);
 
711
}
 
712
 
 
713
public void sym(double[] x, double[] y, int code) {
 
714
    if (set_stream() == -1) return;
 
715
    plplotjavac.plsym(x, y, code);
 
716
}
 
717
 
 
718
public void szax(int digmax, int digits) {
 
719
    if (set_stream() == -1) return;
 
720
    plplotjavac.plszax(digmax, digits);
 
721
}
 
722
 
 
723
public void text() {
 
724
    if (set_stream() == -1) return;
 
725
    plplotjavac.pltext();
 
726
}
 
727
 
 
728
public void vasp(double aspect) {
 
729
    if (set_stream() == -1) return;
 
730
    plplotjavac.plvasp(aspect);
 
731
}
 
732
 
 
733
public void vect(double[][] u, double[][] v, double scale, double[][] pltr, double[][] OBJECT_DATA) {
 
734
    if (set_stream() == -1) return;
 
735
    plplotjavac.plvect(u, v, scale, pltr, OBJECT_DATA);
 
736
}
 
737
 
 
738
public void vpas(double xmin, double xmax, double ymin, double ymax, double aspect) {
 
739
    if (set_stream() == -1) return;
 
740
    plplotjavac.plvpas(xmin, xmax, ymin, ymax, aspect);
 
741
}
 
742
 
 
743
public void vpor(double xmin, double xmax, double ymin, double ymax) {
 
744
    if (set_stream() == -1) return;
 
745
    plplotjavac.plvpor(xmin, xmax, ymin, ymax);
 
746
}
 
747
 
 
748
public void vsta() {
 
749
    if (set_stream() == -1) return;
 
750
    plplotjavac.plvsta();
 
751
}
 
752
 
 
753
public void w3d(double basex, double basey, double height, double xmin0, 
 
754
                double xmax0, double ymin0, double ymax0, double zmin0, 
 
755
                double zmax0, double alt, double az) {
 
756
    if (set_stream() == -1) return;
 
757
    plplotjavac.plw3d(basex, basey, height, xmin0, xmax0, ymin0, ymax0, 
 
758
                    zmin0, zmax0, alt, az);
 
759
}
 
760
 
 
761
public void wid(int width) {
 
762
    if (set_stream() == -1) return;
 
763
    plplotjavac.plwid(width);
 
764
}
 
765
 
 
766
public void wind(double xmin, double xmax, double ymin, double ymax) {
 
767
    if (set_stream() == -1) return;
 
768
    plplotjavac.plwind(xmin, xmax, ymin, ymax);
 
769
}
 
770
 
 
771
public void xormod(boolean mode, boolean[] status) {
 
772
    if (set_stream() == -1) return;
 
773
    plplotjavac.plxormod(mode, status);
 
774
}
 
775
 
 
776
public void ClearOpts() {
 
777
    if (set_stream() == -1) return;
 
778
    plplotjavac.plClearOpts();
 
779
}
 
780
 
 
781
public void ResetOpts() {
 
782
    if (set_stream() == -1) return;
 
783
    plplotjavac.plResetOpts();
 
784
}
 
785
 
 
786
public void SetUsage(String program_string, String usage_string) {
 
787
    if (set_stream() == -1) return;
 
788
    plplotjavac.plSetUsage(program_string, usage_string);
 
789
}
 
790
 
 
791
public void OptUsage() {
 
792
    if (set_stream() == -1) return;
 
793
    plplotjavac.plOptUsage();
 
794
}
 
795
 
 
796
public void hlsrgb(double h, double l, double s, double[] r, double[] g, double[] b) {
 
797
    if (set_stream() == -1) return;
 
798
    plplotjavac.plhlsrgb(h,l,s,r,g,b);
 
799
}
 
800
 
 
801
public void rgbhls(double r, double g, double b, double[] h, double[] l, double[] s) {
 
802
    if (set_stream() == -1) return;
 
803
    plplotjavac.plrgbhls(r,g,b,h,l,s);
 
804
}
 
805
 
 
806
// Deprecated versions of methods which use int for a flag instead of 
 
807
// boolean.
 
808
public void cpstrm(int iplsr, int flags) {
 
809
    if (set_stream() == -1) return;
 
810
    plplotjavac.plcpstrm(iplsr, flags != 0);
 
811
}
 
812
 
 
813
public void plot3d(double[] x, double[] y, double[][] z, int opt, int side) {
 
814
    if (set_stream() == -1) return;
 
815
    plplotjavac.plot3d(x, y, z, opt, side != 0);
 
816
}
 
817
 
 
818
public void poly3(double[] x, double[] y, double[] z, int[] draw, int ifcc) {
 
819
    if (set_stream() == -1) return;
 
820
    boolean [] loc_draw = new boolean[draw.length];
 
821
    for (int i=0;i<draw.length;i++) {
 
822
        loc_draw[i] = (draw[i]!=0);
 
823
    }
 
824
    plplotjavac.plpoly3(x, y, z, loc_draw, ifcc != 0);
 
825
}
 
826
 
 
827
public void scmap1l(int itype, double[] intensity, double[] coord1, 
 
828
                double[] coord2, double[] coord3, int[] rev) {
 
829
    if (set_stream() == -1) return;
 
830
    boolean [] loc_rev = new boolean[rev.length];
 
831
    for (int i=0;i<rev.length;i++) {
 
832
        loc_rev[i] = (rev[i]!=0);
 
833
    }
 
834
    plplotjavac.plscmap1l(itype != 0, intensity, coord1, coord2, coord3, loc_rev);
 
835
}
 
836
 
 
837
public void shades( double[][] a, double xmin, double xmax, double ymin,
 
838
                double ymax, double[] clevel, int fill_width, int cont_color,
 
839
                int cont_width, int rectangular, 
 
840
                double[][] pltr, double[][] OBJECT_DATA) {
 
841
    if (set_stream() == -1) return;
 
842
    plplotjavac.plshades( a, xmin, xmax, ymin, ymax, clevel, fill_width,
 
843
                    cont_color, cont_width, rectangular != 0, pltr, OBJECT_DATA);
 
844
}
 
845
 
 
846
public void shade(double[][] a, double left, double right, double bottom,
 
847
                double top, double shade_min, double shade_max, int sh_cmap,
 
848
                double sh_color, int sh_width, int min_color, int min_width, 
 
849
                int max_color, int max_width, int rectangular, 
 
850
                double[][] pltr, double[][] OBJECT_DATA) {
 
851
    if (set_stream() == -1) return;
 
852
    plplotjavac.plshade(a, left, right, bottom, top, shade_min, shade_max,
 
853
                    sh_cmap, sh_color, sh_width, min_color, min_width, 
 
854
                    max_color, max_width, rectangular != 0, pltr, OBJECT_DATA);
 
855
}
 
856
 
 
857
public void spause(int pause) {
 
858
    if (set_stream() == -1) return;
 
859
    plplotjavac.plspause(pause != 0);
 
860
}
 
861
 
 
862
public void stripc(int[] id, String xspec, String yspec, 
 
863
                double xmin, double xmax, double xjump, 
 
864
                double ymin, double ymax, double xlpos, double ylpos, 
 
865
                int y_ascl, int acc, int colbox, int collab, 
 
866
                int[] colline, int[] styline, SWIGTYPE_p_p_char legline, 
 
867
                String labx, String laby, String labtop) {
 
868
    if (set_stream() == -1) return;
 
869
    plplotjavac.plstripc(id, xspec, yspec, xmin, xmax, xjump, ymin, ymax, 
 
870
                    xlpos, ylpos, y_ascl != 0, acc != 0, colbox, collab, 
 
871
                    colline, styline, legline, labx, laby, labtop);
 
872
}
 
873
 
 
874
public void svect(double[] arrow_x, double[] arrow_y, int fill) {
 
875
    if (set_stream() == -1) return;
 
876
    plplotjavac.plsvect(arrow_x, arrow_y, fill != 0);
 
877
}
 
878
 
 
879
public void xormod(int mode, int[] status) {
 
880
    if (set_stream() == -1) return;
 
881
    boolean [] loc_status = new boolean[1];
 
882
    plplotjavac.plxormod(mode != 0, loc_status);
 
883
   status[0] = loc_status[0] ? 1 : 0;
 
884
}
 
885
 
 
886
}