pgplot 0.1.7

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/ext/version.h ADDED
@@ -0,0 +1 @@
1
+ #define RUBY_PGPLOT_VERSION "0.1.7"
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[0].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,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pgplot
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.7
5
+ platform: ruby
6
+ authors:
7
+ - Masahiro Tanaka
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-02-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: narray
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.5.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.5.0
27
+ description: PGPLOT wrapper for Ruby
28
+ email: masa16.tanaka@gmail.com
29
+ executables: []
30
+ extensions:
31
+ - ext/extconf.rb
32
+ extra_rdoc_files:
33
+ - README
34
+ - README.ja
35
+ - FuncUsage
36
+ - ext/rb_pgplot.c
37
+ files:
38
+ - README
39
+ - README.ja
40
+ - FuncUsage
41
+ - demo/pgdemo1.rb
42
+ - demo/pgdemo15.rb
43
+ - demo/pgdemo3.rb
44
+ - demo/pgdemo4.rb
45
+ - demo/pgdemo9.rb
46
+ - ext/cogen.rb
47
+ - ext/depend
48
+ - ext/extconf.rb
49
+ - ext/kwarg.c
50
+ - ext/rb_pgplot.c.in
51
+ - ext/version.h
52
+ - test/pgband.rb
53
+ - test/pgcurs.rb
54
+ - test/pggray.rb
55
+ - test/pglcur.rb
56
+ - test/pgline.rb
57
+ - test/pgncur.rb
58
+ - test/pgolin.rb
59
+ - test/pgtick.rb
60
+ - ext/rb_pgplot.c
61
+ homepage: http://pgplot.rubyforge.org/
62
+ licenses: []
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options:
66
+ - --title
67
+ - Ruby/PGPLOT
68
+ - --main
69
+ - README
70
+ - --exclude
71
+ - demo/
72
+ - --exclude
73
+ - test/
74
+ - --exclude
75
+ - ext/
76
+ - --exclude
77
+ - pgplot\.so
78
+ - --exclude
79
+ - libpgplot\.*
80
+ require_paths:
81
+ - .
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project: pgplot
94
+ rubygems_version: 2.0.0
95
+ signing_key:
96
+ specification_version: 2
97
+ summary: PGPLOT wrapper for Ruby. The PGPLOT library needs to be installed in advance
98
+ using GNU FORTRAN compiler
99
+ test_files: []