From: <hez...@us...> - 2012-01-21 18:50:29
|
Revision: 12142 http://plplot.svn.sourceforge.net/plplot/?rev=12142&view=rev Author: hezekiahcarty Date: 2012-01-21 18:50:23 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Update OCaml example 21 to match recent C example changes - Points are now colored according to the Z-value of the point - plstring is used to draw points rather than plpoin Modified Paths: -------------- trunk/examples/ocaml/x21.ml Modified: trunk/examples/ocaml/x21.ml =================================================================== --- trunk/examples/ocaml/x21.ml 2012-01-21 05:25:57 UTC (rev 12141) +++ trunk/examples/ocaml/x21.ml 2012-01-21 18:50:23 UTC (rev 12142) @@ -2,7 +2,7 @@ Grid data demo Copyright (C) 2004 Joao Cardoso - Copyright (C) 2008 Hezekiah M. Carty + Copyright (C) 2008, 2012 Hezekiah M. Carty This file is part of PLplot. @@ -107,6 +107,10 @@ (* Initialize plplot *) plinit (); + (* Use a locally defined continuous color map *) + cmap1_init (); + + (* Initialize the random number generator with a common seed *) plseed (5489L); (* The sampled data *) @@ -121,8 +125,10 @@ plenv xm xM ym yM 2 0; plcol0 15; pllab "X" "Y" "The original data sampling"; - plcol0 2; - plpoin x y 5; + for i = 0 to pts - 1 do + plcol1 ((z.(i) -. zmin) /. (zmax -. zmin)); + plstring [|x.(i)|] [|y.(i)|] "#(727)"; + done; pladv 0; plssub 3 2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |