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

« back to all changes in this revision

Viewing changes to examples/java/x05.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: x05.java,v 1.7 2004/01/17 16:41:39 rlaboiss Exp $
 
2
// $Id: x05.java,v 1.15 2005/12/19 21:56:37 airwin Exp $
3
3
//---------------------------------------------------------------------------//
4
4
 
5
5
//---------------------------------------------------------------------------//
6
6
// Copyright (C) 2001  Geoffrey Furnish
7
7
// Copyright (C) 2001, 2002  Alan W. Irwin
 
8
// Copyright (C) 2004  Andrew Ross
8
9
//
9
10
// This file is part of PLplot.
10
11
//
19
20
//
20
21
// You should have received a copy of the GNU Library General Public License
21
22
// along with PLplot; if not, write to the Free Software
22
 
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
23
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
23
24
//---------------------------------------------------------------------------//
24
25
 
25
26
//---------------------------------------------------------------------------//
34
35
 
35
36
class x05 {
36
37
 
37
 
    final int NPTS = 2047;
 
38
    static final int NPTS = 2047;
38
39
 
39
40
    public static void main( String[] args ) 
40
41
    {
43
44
 
44
45
    public x05( String[] args )
45
46
    {
46
 
       PLStreamc plsdummy = new PLStreamc();
47
 
       plplotjavac pls = new plplotjavac();
 
47
       PLStream pls = new PLStream();
48
48
 
49
49
        int i;
50
50
        double[] data = new double[NPTS];
52
52
 
53
53
    // Parse and process command line arguments.
54
54
 
55
 
        pls.plParseOpts( args, pls.PL_PARSE_FULL | pls.PL_PARSE_NOPROGRAM );
 
55
        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
56
56
 
57
57
    // Initialize plplot.
58
58
 
59
 
        pls.plinit();
 
59
        pls.init();
60
60
 
61
61
    // Fill up data points.
62
62
 
64
64
        for (i = 0; i < NPTS; i++)
65
65
            data[i] = Math.sin(i * delta);
66
66
 
67
 
        pls.plcol0(1);
68
 
        pls.plhist(data, -1.1, 1.1, 44, 0);
69
 
        pls.plcol0(2);
70
 
        pls.pllab( "#frValue", "#frFrequency",
 
67
        pls.col0(1);
 
68
        pls.hist(data, -1.1, 1.1, 44, PLStream.PL_HIST_DEFAULT);
 
69
        pls.col0(2);
 
70
        pls.lab( "#frValue", "#frFrequency",
71
71
                 "#frPLplot Example 5 - Probability function of Oscillator" );
72
72
 
73
 
        pls.plend();
 
73
        pls.end();
74
74
    }
75
75
}
76
76