File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
require 'gnuplot'
2
2
3
3
Gnuplot . open do |gp |
4
- gp << "bin(x, s) = s*int(x/s)\n "
4
+ gp << "bin(x, s) = s*int(x/s)\n "
5
5
6
- Gnuplot ::Plot . new ( gp ) do |plot |
7
- plot . title "Histogram"
8
- plot . xlabel "x"
9
- plot . ylabel "frequency"
6
+ Gnuplot ::Plot . new ( gp ) do |plot |
7
+ plot . title "Histogram"
8
+ plot . xlabel "x"
9
+ plot . ylabel "frequency"
10
10
11
- x = ( 0 ..500 ) . collect { |v | ( rand ( ) -0.5 ) **3 }
12
- plot . data << Gnuplot ::DataSet . new ( [ x ] ) do |ds |
13
- ds . title = "smooth frequency"
14
- ds . using = "(bin($1,.01)):(1.)"
15
- ds . smooth = "freq"
16
- ds . with = "boxes"
17
- end
11
+ x = ( 0 ..500 ) . collect { |v | ( rand ( ) -0.5 ) **3 }
12
+ plot . data << Gnuplot ::DataSet . new ( [ x ] ) do |ds |
13
+ ds . title = "smooth frequency"
14
+ ds . using = "(bin($1,.01)):(1.)"
15
+ ds . smooth = "freq"
16
+ ds . with = "boxes"
18
17
end
18
+ end
19
19
end
20
20
You can’t perform that action at this time.
0 commit comments