1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2007-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
4 // This file is released under the 3-clause BSD license. See COPYING-BSD.
6 //===========================================================
9 //===========================================================
13 my_handle = scf(100001);
14 clf(my_handle,"reset");
15 demo_viewCode("bar.dem.sce");
19 x=[1 2 3 4 5 6 7 8 9 10 11 12];
20 y=[ 13702 16902 22765 ; ..
21 13758 19959 21321 ; ..
22 16944 23254 24971 ; ..
23 16324 18323 21325 ; ..
24 15399 19648 24176 ; ..
25 14988 17160 22978 ; ..
26 10275 10996 25754 ; ..
27 10195 14316 25128 ; ..
28 14899 18410 33430 ; ..
29 18884 23924 49388 ; ..
30 16919 21535 43048 ; ..
35 BackgroundColorId = color(225,253,223);
36 year2005ColorId = color(238,222,12);
37 year2006ColorId = color(255,0,0);
38 year2007ColorId = color(64,155,59);
44 title("bar(''grouped'')", "fontsize", 3)
50 axes.background = BackgroundColorId;
51 axes.x_ticks.labels = ["Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"];
54 years = axes.children.children;
59 year2005.background = year2005ColorId;
60 year2006.background = year2006ColorId;
61 year2007.background = year2007ColorId;
63 year2005.bar_width = 0.25;
64 year2006.bar_width = 0.25;
65 year2007.bar_width = 0.25;
69 captions(histo.children($:-1:1), ["Year 2005";"Year 2006";"Year 2007"]);
71 legs.legend_location = "in_upper_left";