From: <and...@us...> - 2008-12-08 09:08:19
|
Revision: 9053 http://plplot.svn.sourceforge.net/plplot/?rev=9053&view=rev Author: andrewross Date: 2008-12-08 09:08:15 +0000 (Mon, 08 Dec 2008) Log Message: ----------- ANR for Hezekiah M Carty. Convert integer constants in plbin and plhist to use PL_* variant type list. Update example 5 to use these. Modified Paths: -------------- trunk/bindings/ocaml/plplot.idl trunk/bindings/ocaml/plplot_h trunk/bindings/ocaml/plplot_h.inc trunk/examples/ocaml/x05.ml Modified: trunk/bindings/ocaml/plplot.idl =================================================================== --- trunk/bindings/ocaml/plplot.idl 2008-12-06 17:44:55 UTC (rev 9052) +++ trunk/bindings/ocaml/plplot.idl 2008-12-08 09:08:15 UTC (rev 9053) @@ -33,6 +33,23 @@ }; typedef [set] enum plplot3d_style_enum plplot3d_style; +enum plplot_bin_enum { + PL_BIN_DEFAULT = 0, + PL_BIN_CENTRED = 1, + PL_BIN_NOEXPAND = 2, + PL_BIN_NOEMPTY = 4, +}; +typedef [set] enum plplot_bin_enum plplot_bin_style; + +enum plplot_hist_enum { + PL_HIST_DEFAULT = 0, + PL_HIST_NOSCALING = 1, + PL_HIST_IGNORE_OUTLIERS = 2, + PL_HIST_NOEXPAND = 8, + PL_HIST_NOEMPTY = 16, +}; +typedef [set] enum plplot_hist_enum plplot_hist_style; + // This is a simplified and modified version of the plplot.h file. #include "plplot_h.inc" Modified: trunk/bindings/ocaml/plplot_h =================================================================== --- trunk/bindings/ocaml/plplot_h 2008-12-06 17:44:55 UTC (rev 9052) +++ trunk/bindings/ocaml/plplot_h 2008-12-08 09:08:15 UTC (rev 9053) @@ -37,7 +37,7 @@ const char *yopt, PLFLT ytick, PLINT nysub); void -c_plbin(PLINT nbin, PLFLT *x, PLFLT *y, PLINT opt); +c_plbin(PLINT nbin, PLFLT *x, PLFLT *y, plplot_bin_style opt); void c_plbop(void); @@ -216,7 +216,7 @@ void c_plhist(PLINT n, PLFLT *data, PLFLT datmin, PLFLT datmax, - PLINT nbin, PLINT opt); + PLINT nbin, plplot_hist_style opt); void c_plhls(PLFLT h, PLFLT l, PLFLT s); Modified: trunk/bindings/ocaml/plplot_h.inc =================================================================== --- trunk/bindings/ocaml/plplot_h.inc 2008-12-06 17:44:55 UTC (rev 9052) +++ trunk/bindings/ocaml/plplot_h.inc 2008-12-08 09:08:15 UTC (rev 9053) @@ -3,7 +3,7 @@ [mlname(pladv)] void c_pladv ( int page ); [mlname(plsvect)] void c_plsvect ( [in, size_is(npts)] double * arrowx, [in, size_is(npts)] double * arrowy, int npts, boolean fill ); [mlname(plaxes)] void c_plaxes ( double x0, double y0, [string] const char * xopt, double xtick, int nxsub, [string] const char * yopt, double ytick, int nysub ); -[mlname(plbin)] void c_plbin ( int nbin, [in, size_is(nbin)] double * x, [in, size_is(nbin)] double * y, int opt ); +[mlname(plbin)] void c_plbin ( int nbin, [in, size_is(nbin)] double * x, [in, size_is(nbin)] double * y, plplot_bin_style opt ); [mlname(plbop)] void c_plbop ( void ); [mlname(plbox)] void c_plbox ( [string] const char * xopt, double xtick, int nxsub, [string] const char * yopt, double ytick, int nysub ); [mlname(plbox3)] void c_plbox3 ( [string] const char * xopt, [string] const char * xlabel, double xtick, int nsubx, [string] const char * yopt, [string] const char * ylabel, double ytick, int nsuby, [string] const char * zopt, [string] const char * zlabel, double ztick, int nsubz ); @@ -50,7 +50,7 @@ [mlname(plgxax)] void c_plgxax ( [out] int * p_digmax, [out] int * p_digits ); [mlname(plgyax)] void c_plgyax ( [out] int * p_digmax, [out] int * p_digits ); [mlname(plgzax)] void c_plgzax ( [out] int * p_digmax, [out] int * p_digits ); -[mlname(plhist)] void c_plhist ( int n, [in, size_is(n), size_is(n)] double * data, double datmin, double datmax, int nbin, int opt ); +[mlname(plhist)] void c_plhist ( int n, [in, size_is(n), size_is(n)] double * data, double datmin, double datmax, int nbin, plplot_hist_style opt ); [mlname(plhls)] void c_plhls ( double h, double l, double s ); [mlname(plhlsrgb)] void c_plhlsrgb ( double h, double l, double s, [out] double * p_r, [out] double * p_g, [out] double * p_b ); [mlname(plinit)] void c_plinit ( void ); Modified: trunk/examples/ocaml/x05.ml =================================================================== --- trunk/examples/ocaml/x05.ml 2008-12-06 17:44:55 UTC (rev 9052) +++ trunk/examples/ocaml/x05.ml 2008-12-08 09:08:15 UTC (rev 9053) @@ -26,7 +26,7 @@ let data = Array.init npts (fun i -> sin (float_of_int i *. delta)) in plcol0 1; - plhist data (-1.1) 1.1 44 0; + plhist data (-1.1) 1.1 44 [PL_HIST_DEFAULT]; plcol0 2; pllab "#frValue" "#frFrequency" "#frPLplot Example 5 - Probability function of Oscillator"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |