File: demo_scilab.sci

package info (click to toggle)
scilab 4.0-12
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 100,640 kB
  • ctags: 57,333
  • sloc: ansic: 377,889; fortran: 242,862; xml: 179,819; tcl: 42,062; sh: 10,593; ml: 9,441; makefile: 4,377; cpp: 1,354; java: 621; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (189 lines) | stat: -rw-r--r-- 3,926 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
function demo_scilab()
  demo_help demo_scilab
  // Définition des variables

x=[1 2 3 4 5 6 7 8 9 10 11 12];
y=[ 0 0 0 ; ..
    0 0 0 ; ..
    8231 0 0 ; ..
    791 0 0 ; ..
    7111 0 0 ; ..
    6812 0 0 ; ..
    3919 0 0 ; ..
    3809 0 0 ; ..
    7450 0 0 ; ..
    9039 0 0 ; ..
    7708 0 0; ..
    6223 0 0];

// bar()
f = gcf() ;
f.pixmap = 'on' ;

bar(x,y);
SetPosition() ;
// Ajustements

axes = gca();
axes.data_bounds = [ 0 0 ; 12.5 20000 ];
axes.x_ticks.labels = ['Jan';'Feb';'Mar';'Apr';'May';'Jun';'Jul';'Aug';'Sep';'Oct';'Nov';'Dec'];
axes.grid=[-1 0];
axes.y_label.text = "Number of downloads" ;
t = axes.title ;
t.text = "Scilab download statistics" ;
t.font_size = 5 ;

years = axes.children.children;
year2003 = years(3);
year2004 = years(2);
year2005 = years(1);

year2003.background = 32;
year2004.background = 5;
year2005.background = 33;

year2003.bar_width = 0.25;
year2004.bar_width = 0.25;
year2005.bar_width = 0.25;

legends(['Year 2003';'Year 2004';'Year 2005'],[32;5;33],[9.5;19500]);

histogramme = gcf();
histogramme.background = 17;

legend_axes = histogramme.children(1);

legend_axes.children.children(2).thickness = 4;
legend_axes.children.children(4).thickness = 4;
legend_axes.children.children(6).thickness = 4;

show_pixmap() ;


  realtimeinit(1.0) ;
  for i=1:7
    realtime(i) ;
  end ;

x=[1 2 3 4 5 6 7 8 9 10 11 12];
y=[ 0 7687 0 ; ..
    0 8003 0 ; ..
    8231 10450 0 ; ..
    791 9124 0 ; ..
    7111 11099 0 ; ..
    6812 10718 0 ; ..
    3919 13869 0 ; ..
    3809 10628 0 ; ..
    7450 13022 0 ; ..
    9039 16442 0 ; ..
    7708 15116 0; ..
    6223 11384 0];


// bar()
clf() ;
SetPosition() ;
bar(x,y);

axes = gca();
axes.data_bounds = [ 0 0 ; 12.5 20000 ];
axes.x_ticks.labels = ['Jan';'Feb';'Mar';'Apr';'May';'Jun';'Jul';'Aug';'Sep';'Oct';'Nov';'Dec'];
axes.grid=[-1 0];
axes.y_label.text = "Number of downloads" ;
t = axes.title ;
t.text = "Scilab download statistics" ;
t.font_size = 5 ;

years = axes.children.children;
year2003 = years(3);
year2004 = years(2);
year2005 = years(1);

year2003.background = 32;
year2004.background = 5;
year2005.background = 33;

year2003.bar_width = 0.25;
year2004.bar_width = 0.25;
year2005.bar_width = 0.25;

legends(['Year 2003';'Year 2004';'Year 2005'],[32;5;33],[9.5;19500]);

histogramme = gcf();
histogramme.background = 17;

legend_axes = histogramme.children(1);

legend_axes.children.children(2).thickness = 4;
legend_axes.children.children(4).thickness = 4;
legend_axes.children.children(6).thickness = 4;

show_pixmap() ;

  realtimeinit(1.0) ;
  for i=1:7
    realtime(i) ;
  end ;

x=[1 2 3 4 5 6 7 8 9 10 11 12];
y=[ 0 7687 13588 ; ..
    0 8003 13597 ; ..
    8231 10450 16772 ; ..
    791 9124 16169 ; ..
    7111 11099 15267 ; ..
    6812 10718 14855 ; ..
    3919 13869 10147 ; ..
    3809 10628 9998 ; ..
    7450 13022 14445 ; ..
    9039 16442 18212 ; ..
    7708 15116 16238; ..
    6223 11384 14335];

// bar()
clf() ;
SetPosition() ;
bar(x,y);

// Ajustements

axes = gca();
axes.data_bounds = [ 0 0 ; 12.5 20000 ];
axes.x_ticks.labels = ['Jan';'Feb';'Mar';'Apr';'May';'Jun';'Jul';'Aug';'Sep';'Oct';'Nov';'Dec'];
axes.grid=[-1 0];
axes.y_label.text = "Number of downloads" ;
t = axes.title ;
t.text = "Scilab download statistics" ;
t.font_size = 5 ;

years = axes.children.children;
year2003 = years(3);
year2004 = years(2);
year2005 = years(1);

year2003.background = 32;
year2004.background = 5;
year2005.background = 33;

year2003.bar_width = 0.25;
year2004.bar_width = 0.25;
year2005.bar_width = 0.25;

legends(['Year 2003';'Year 2004';'Year 2005'],[32;5;33],[9.5;19500]);

histogramme = gcf();
histogramme.background = 17;

legend_axes = histogramme.children(1);

legend_axes.children.children(2).thickness = 4;
legend_axes.children.children(4).thickness = 4;
legend_axes.children.children(6).thickness = 4;

show_pixmap() ;

  realtimeinit(1.0) ;
  for i=1:10
    realtime(i) ;
  end ;
  
endfunction