01: /*
02: * Created on Nov 5, 2004
03: *
04: */
05: package test.plplot.examples;
06:
07: import test.plplot.core.PLStream;
08:
09: /**
10: * @author Ali
11: *
12: */
13: public class Test extends Thread {
14:
15: static {
16: System.load("c:\\jmatlab\\jmatlab\\jplplot.dll");
17: }
18:
19: public void run() {
20: PLStream pls = new PLStream();
21: pls.sdev("win3");
22: pls.init();
23: double[] x = new double[] { 1.0, 2.0, 3.0 };
24: double[] y = new double[] { 1.0, 2.0, 3.0 };
25: pls.col0(1);
26: pls.env(0.0, 10.0, 0.0, 10.0, 0, 1);
27: pls.col0(2);
28: pls.poin(x, y, 0);
29: pls.flush();
30: pls.end1();
31: }
32:
33: public static void main(String[] args) {
34: PLStream pls = new PLStream();
35: pls.sstrm(1);
36: pls.sdev("win3");
37: pls.init();
38: double[] x = new double[] { 1.0, 2.0, 3.0 };
39: double[] y = new double[] { 1.0, 2.0, 3.0 };
40: pls.col0(1);
41: pls.env(0.0, 10.0, 0.0, 10.0, 0, 1);
42: pls.col0(2);
43: pls.poin(x, y, 0);
44: pls.flush();
45: pls.end1();
46: pls = new PLStream();
47: pls.sstrm(2);
48: pls.sdev("win3");
49: pls.init();
50: double[] a = new double[] { 1.0, 4.0, 9.0 };
51: double[] b = new double[] { 1.0, 2.0, 3.0 };
52: pls.col0(1);
53: pls.env(0.0, 10.0, 0.0, 10.0, 0, 1);
54: pls.col0(2);
55: pls.poin(a, b, 0);
56: pls.flush();
57: pls.end1();
58:
59: /* Test t = new Test();
60: t.start();
61: t = new Test();
62: t.start();
63: */}
64: }
|