ruby-pgplot 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/test/pgband.rb ADDED
@@ -0,0 +1,21 @@
1
+ require 'narray'
2
+ require 'pgplot'
3
+ include Pgplot
4
+
5
+ pgbeg
6
+ pgenv 0, 1, 0, 1
7
+ pglab '','','Demo of PGBAND'
8
+
9
+ c = PgCursor.new(0,0)
10
+ for mode in 0..7
11
+ puts 'Mode %d: Enter key or click on the window'%mode
12
+ c = pgband(mode, c.x, c.y)
13
+ p c
14
+ end
15
+
16
+ x = y = 0
17
+ for mode in 0..7
18
+ puts 'Mode %d: Enter key or click on the window'%mode
19
+ x,y = pgband(mode, x, y)
20
+ p [x,y]
21
+ end
data/test/pgcurs.rb ADDED
@@ -0,0 +1,14 @@
1
+ require 'narray'
2
+ require 'pgplot'
3
+ include Pgplot
4
+
5
+ pgbeg
6
+ pgenv 0, 1, 0, 1
7
+ pglab '','','Demo of PGCURS'
8
+
9
+ c = PgCursor.new(0,0)
10
+ for mode in 0..7
11
+ puts 'Enter a key on the window:'
12
+ c = pgcurs(c.x, c.y)
13
+ pgpt1(c.x, c.y, c.char.ord)
14
+ end
data/test/pggray.rb ADDED
@@ -0,0 +1,21 @@
1
+ require 'narray'
2
+ require 'pgplot'
3
+ include Pgplot
4
+
5
+ n = 100
6
+ x = NArray.sfloat(n,1).indgen!/10
7
+ y = NArray.sfloat(1,n).indgen!/10
8
+ a = NMath.sin(x) * NMath.cos(y)
9
+
10
+ pgbeg
11
+
12
+ pgenv 0,(n+1)/10.0, 0,(n+1)/10.0, 1 # scales of X and Y are equal
13
+ pglab "(x)", "(y)", "PGGRAY Demo: sin(x)*cos(y)"
14
+ pgscir 16,64
15
+ pggray a, -1..1, [0,0.1,0,0,0,0.1]
16
+
17
+ pgenv 0,(n+1)/10.0, 0,(n+1)/10.0 # independent scales
18
+ pglab "(x)", "(y)", "PGIMAG Demo: sin(x)*cos(y)"
19
+ pgscir 16,64
20
+ pgctab [0,1],[0,1],[0,1],[0,1]
21
+ pgimag a, -1..1, [0,0.1,0,0,0,0.1]
data/test/pglcur.rb ADDED
@@ -0,0 +1,14 @@
1
+ require 'narray'
2
+ require 'pgplot'
3
+ include Pgplot
4
+
5
+ n = 10
6
+ x = NArray.sfloat(n).indgen!
7
+ y = NMath.sin(NArray.sfloat(n).indgen!)*3+n/2
8
+
9
+ pgbeg
10
+ pgenv 0, 10, 0, 10
11
+ pglab '','','Demo of PGLCUR'
12
+
13
+ n = pglcur(x,y,n/2)
14
+ p x[0...n], y[0...n]
data/test/pgline.rb ADDED
@@ -0,0 +1,13 @@
1
+ require 'narray'
2
+ require 'pgplot'
3
+ include Pgplot
4
+
5
+ n = 100
6
+ x = NArray.sfloat(n).indgen!/10
7
+ y = NMath.sin(x)
8
+
9
+ pgbeg()
10
+
11
+ pgenv 0, n/10, -1, 1
12
+ pglab "(x)", "(y)", "PGPLOT Example 1: y = x\\u2\\d"
13
+ pgline x, y
data/test/pgncur.rb ADDED
@@ -0,0 +1,14 @@
1
+ require 'narray'
2
+ require 'pgplot'
3
+ include Pgplot
4
+
5
+ n = 10
6
+ x = NArray.sfloat(n).indgen!
7
+ y = NArray.sfloat(n).indgen!
8
+
9
+ pgbeg
10
+ pgenv 0, 10, 0, 10
11
+ pglab '','','Demo of PGNCUR'
12
+
13
+ n = pgncur(x,y,2,n/2)
14
+ p x[0...n], y[0...n]
data/test/pgolin.rb ADDED
@@ -0,0 +1,14 @@
1
+ require 'narray'
2
+ require 'pgplot'
3
+ include Pgplot
4
+
5
+ n = 10
6
+ x = NArray.sfloat(n).indgen!
7
+ y = NArray.sfloat(n).indgen!
8
+
9
+ pgbeg
10
+ pgenv 0, 10, 0, 10
11
+ pglab '','','Demo of PGOLIN'
12
+
13
+ n = pgolin(x,y,2,n/2)
14
+ p x[0...n], y[0...n]
data/test/pgtick.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'narray'
2
+ require 'pgplot'
3
+ include Pgplot
4
+
5
+ pgbeg
6
+ pgenv 0,10, 0,10
7
+
8
+ pgtick( 0, 7, 10, 7, 0.25, "quarter" )
9
+ pgtick( 0, 7, 10, 7, 0.5, "half", "tickr"=>1, "disp"=>2, "orient"=>90 )
10
+ pgtick( 0, 7, 10, 7, 0.75, "3quarter", "tickl"=>1, "disp"=>-2, "orient"=>180 )
11
+
12
+ pgaxis( 1, 1, 9, 5, 0, 3, "tickl"=>1, "opt"=>"NL2" )
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-pgplot
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 5
9
+ version: 0.1.5
10
+ platform: ruby
11
+ authors:
12
+ - Masahiro Tanaka
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2012-01-04 00:00:00 +09:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: narray
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 5
31
+ - 0
32
+ version: 0.5.0
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ description: PGPLOT wrapper for Ruby
36
+ email: masa16.tanaka@gmail.com
37
+ executables: []
38
+
39
+ extensions:
40
+ - extconf.rb
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - extconf.rb
45
+ - rb_pgplot.c.in
46
+ - README
47
+ - README.ja
48
+ - cogen.rb
49
+ - depend
50
+ - kwarg.c
51
+ - demo/pgdemo1.rb
52
+ - demo/pgdemo15.rb
53
+ - demo/pgdemo3.rb
54
+ - demo/pgdemo4.rb
55
+ - demo/pgdemo9.rb
56
+ - test/pgband.rb
57
+ - test/pgcurs.rb
58
+ - test/pggray.rb
59
+ - test/pglcur.rb
60
+ - test/pgline.rb
61
+ - test/pgncur.rb
62
+ - test/pgolin.rb
63
+ - test/pgtick.rb
64
+ has_rdoc: true
65
+ homepage: http://pgplot.rubyforge.org/
66
+ licenses: []
67
+
68
+ post_install_message:
69
+ rdoc_options: []
70
+
71
+ require_paths:
72
+ - .
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ segments:
79
+ - 0
80
+ version: "0"
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ segments:
87
+ - 0
88
+ version: "0"
89
+ requirements: []
90
+
91
+ rubyforge_project: ruby-pgplot
92
+ rubygems_version: 1.3.7
93
+ signing_key:
94
+ specification_version: 2
95
+ summary: PGPLOT wrapper for Ruby
96
+ test_files: []
97
+