Randlib: minor fix for exponential 37/14137/2
Paul Bignier [Wed, 26 Mar 2014 13:16:25 +0000 (14:16 +0100)]
Added legend and fixed title.

Change-Id: I720b75c5741a6f2c4e357f90b7801d8f001b8189

scilab/modules/randlib/demos/exp.dem.sce

index dce000f..ec4d5fe 100644 (file)
@@ -29,7 +29,7 @@ function [] = ExpT(n)
     deff("[y]=f(x)","y=lambda*exp(-lambda*x);");
     x=[0:0.1:10]';
     plot2d(x, f(x), 1, "000");
-    titre= _("macro histplot : Histogram plot");
+    titre= _("Simulation of an exponential random variable");
     xtitle(titre,_("Classes"),"N(C)/Nmax");
     PolylineFillColorId = color(179,179,0);
     current_axe = gca();
@@ -38,6 +38,7 @@ function [] = ExpT(n)
     current_axe.children(2).children.fill_mode = "on";
     current_axe.children(2).children.background = PolylineFillColorId;
     current_axe.grid = [-1 PolylineFillColorId];
+    legend([_("Simulation");_("Theory")]);
     drawnow();
 endfunction