From: <hez...@us...> - 2009-08-18 16:21:57
|
Revision: 10284 http://plplot.svn.sourceforge.net/plplot/?rev=10284&view=rev Author: hezekiahcarty Date: 2009-08-18 16:21:50 +0000 (Tue, 18 Aug 2009) Log Message: ----------- Add plspal0 and plspal1 to the OCaml bindings and update x16.ml to use them Modified Paths: -------------- trunk/bindings/ocaml/plplot_h trunk/bindings/ocaml/plplot_h.inc trunk/examples/ocaml/x16.ml Modified: trunk/bindings/ocaml/plplot_h =================================================================== --- trunk/bindings/ocaml/plplot_h 2009-08-18 16:19:11 UTC (rev 10283) +++ trunk/bindings/ocaml/plplot_h 2009-08-18 16:21:50 UTC (rev 10284) @@ -476,6 +476,12 @@ PLINT xoff, PLINT yoff); void +c_plspal0(const char *filename); + + void +c_plspal1(const char *filename); + + void c_plspause(PLBOOL pause); void Modified: trunk/bindings/ocaml/plplot_h.inc =================================================================== --- trunk/bindings/ocaml/plplot_h.inc 2009-08-18 16:19:11 UTC (rev 10283) +++ trunk/bindings/ocaml/plplot_h.inc 2009-08-18 16:21:50 UTC (rev 10284) @@ -107,6 +107,8 @@ [mlname(plsmin)] void c_plsmin ( double def, double scale ); [mlname(plsori)] void c_plsori ( int ori ); [mlname(plspage)] void c_plspage ( double xp, double yp, int xleng, int yleng, int xoff, int yoff ); +[mlname(plspal0)] void c_plspal0 ( [string] const char * filename ); +[mlname(plspal1)] void c_plspal1 ( [string] const char * filename ); [mlname(plspause)] void c_plspause ( boolean pause ); [mlname(plsstrm)] void c_plsstrm ( int strm ); [mlname(plssub)] void c_plssub ( int nx, int ny ); Modified: trunk/examples/ocaml/x16.ml =================================================================== --- trunk/examples/ocaml/x16.ml 2009-08-18 16:19:11 UTC (rev 10283) +++ trunk/examples/ocaml/x16.ml 2009-08-18 16:21:50 UTC (rev 10284) @@ -58,6 +58,10 @@ (* Parse and process command line arguments *) ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + (* Load color palettes *) + plspal0 "cmap0_black_on_white.pal"; + plspal1 "cmap1_gray.pal"; + (* Reduce colors in cmap 0 so that cmap 1 is useful on a 16-color display *) plscmap0n 3; @@ -135,6 +139,11 @@ pllab "distance" "altitude" "Bogon density"; (* Plot using 1d coordinate transform *) + + (* Load color palettes *) + plspal0 "cmap0_black_on_white.pal"; + plspal1 "cmap1_blue_yellow.pal"; + pladv 0; plvpor 0.1 0.9 0.1 0.9; plwind (-1.0) 1.0 (-1.0) 1.0; @@ -150,6 +159,11 @@ pllab "distance" "altitude" "Bogon density"; (* Plot using 2d coordinate transform *) + + (* Load color palettes *) + plspal0 "cmap0_black_on_white.pal"; + plspal1 "cmap1_blue_red.pal"; + pladv 0; plvpor 0.1 0.9 0.1 0.9; plwind (-1.0) 1.0 (-1.0) 1.0; @@ -167,6 +181,11 @@ pllab "distance" "altitude" "Bogon density, with streamlines"; (* Plot using 2d coordinate transform *) + + (* Load color palettes *) + plspal0 ""; + plspal1 ""; + pladv 0; plvpor 0.1 0.9 0.1 0.9; plwind (-1.0) 1.0 (-1.0) 1.0; @@ -201,6 +220,11 @@ pllab "distance" "altitude" "Bogon density with exclusion"; ); (* Example with polar coordinates. *) + + (* Load colour palettes*) + plspal0 "cmap0_black_on_white.pal"; + plspal1 "cmap1_gray.pal"; + pladv 0; plvpor 0.1 0.9 0.1 0.9; plwind (-1.0) 1.0 (-1.0) 1.0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |