From: <and...@us...> - 2012-01-25 12:37:46
|
Revision: 12157 http://plplot.svn.sourceforge.net/plplot/?rev=12157&view=rev Author: andrewross Date: 2012-01-25 12:37:39 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Update ada versions of example 21 to follow the new form. This should complete the changes, with the exception of fortran 77 which I don't propose to update any more. Modified Paths: -------------- trunk/examples/ada/x21a.adb trunk/examples/ada/xthick21a.adb Modified: trunk/examples/ada/x21a.adb =================================================================== --- trunk/examples/ada/x21a.adb 2012-01-25 11:41:48 UTC (rev 12156) +++ trunk/examples/ada/x21a.adb 2012-01-25 12:37:39 UTC (rev 12157) @@ -164,6 +164,8 @@ -- Initialize plplot plinit; + cmap1_init; + plseed(5489); create_data(x, y, z); -- the sampled data @@ -176,8 +178,10 @@ plenv(xm, xMM, ym, yMM, 2, 0); plcol0(15); pllab("X", "Y", "The original data sampling"); - plcol0(2); - plpoin(x, y, 5); + for i in 0 .. (pts-1) loop + plcol1( (z(i)-zmin)/(zmax-zmin) ); + plstring(x(i .. i), y(i .. i), "#(727)"); + end loop; pladv(0); plssub(3, 2); @@ -261,7 +265,6 @@ clev(i) := lzm + (lzMM - lzm) / Long_Float(nl - 1) * Long_Float(i); end loop; - cmap1_init; plvpor(0.0, 1.0, 0.0, 0.9); plwind(-1.1, 0.75, -0.65, 1.20); Modified: trunk/examples/ada/xthick21a.adb =================================================================== --- trunk/examples/ada/xthick21a.adb 2012-01-25 11:41:48 UTC (rev 12156) +++ trunk/examples/ada/xthick21a.adb 2012-01-25 12:37:39 UTC (rev 12157) @@ -164,6 +164,8 @@ -- Initialize plplot Initialize_PLplot; + cmap1_init; + Random_Number_Seed(5489); create_data(x, y, z); -- the sampled data @@ -176,8 +178,10 @@ Set_Environment(xm, xMM, ym, yMM, Justified_Square_Box, Linear_Box_Plus); Set_Pen_Color(White); Write_Labels("X", "Y", "The original data sampling"); - Set_Pen_Color(Yellow); - Draw_Points(x, y, 5); + for i in 0 .. (pts-1) loop + Set_Color_Map_1( (z(i)-zmin)/(zmax-zmin) ); + Draw_String( x(i .. i), y(i .. i), "#(727)" ); + end loop; Advance_To_Subpage(Next_Subpage); Set_Number_Of_Subpages(3, 2); @@ -261,7 +265,6 @@ clev(i) := lzm + (lzMM - lzm) / Long_Float(nl - 1) * Long_Float(i); end loop; - cmap1_init; Set_Viewport_Normalized(0.0, 1.0, 0.0, 0.9); Set_Viewport_World(-1.1, 0.75, -0.65, 1.20); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |