* Bug 15881 fixed: Demos stems bars histograms gathered
[scilab.git] / scilab / modules / graphics / demos / hist_bar_stem / plot2d3.dem.sce
1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2007-2008 - INRIA
3 // Copyright (C) 2010 - DIGITEO - Allan CORNET
4 // Copyright (C) 2018 - Samuel GOUGEON
5 //
6 // This file is released under the 3-clause BSD license. See COPYING-BSD.
7
8 function demo_plot2d3()
9
10     my_handle             = scf(100001);
11     clf(my_handle,"reset");
12     demo_viewCode("plot2d3.dem.sce");
13
14     // DEMO START
15
16     my_plot_desc          = "plot2d3 (stems)";
17     my_handle.figure_name = my_plot_desc;
18
19     n = 32-1;
20     t = (0:n)/n;
21     u = sin(80*%pi*t)+sin(100*%pi*t);
22
23     drawlater
24     plot2d3("enn",1,abs(fft(u,-1))'/n);
25     xgrid(color("gold"),1,8);
26     xtitle("","t","f(t)");
27     title(my_plot_desc, "fontsize",3)
28     curve = gca().children.children;
29
30     set(curve, "foreground", color("limegreen"), "thickness", 1.5);
31     curve.mark_mode = "on";
32     set(curve, "mark_foreground", color("orange"), "mark_style", 10, "mark_size", 1);
33     set(curve, "mark_stride", 2, "mark_offset", 1);
34
35     drawnow
36
37     // DEMO END
38 endfunction
39
40 demo_plot2d3();
41 clear demo_plot2d3;