rubicus 0.1.0 → 0.1.1
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/CHANGES +6 -1
- data/lib/rubicus/layers/custom.rb +2 -0
- data/lib/rubicus/version.rb +1 -1
- metadata +55 -40
- data/Rakefile +0 -84
- data/test/test.rb +0 -131
data/CHANGES
CHANGED
data/lib/rubicus/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,72 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.0
|
3
|
-
specification_version: 1
|
4
2
|
name: rubicus
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
-
|
11
|
-
|
12
|
-
homepage: http://rubicus.rubyforge.org
|
13
|
-
rubyforge_project: rubicus
|
14
|
-
description: Rubicus is a pure Ruby wrapper around the ploticus http://ploticus.sourceforge.net graphing library.
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: false
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
25
10
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
11
|
authors:
|
30
12
|
- Jonathan Younger
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2012-11-09 00:00:00 -07:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Rubicus is a pure Ruby wrapper around the ploticus http://ploticus.sourceforge.net graphing library.
|
22
|
+
email:
|
23
|
+
- jonathan@daikini.com
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
31
30
|
files:
|
32
|
-
- CHANGES
|
33
|
-
- MIT-LICENSE
|
34
|
-
- Rakefile
|
35
|
-
- README
|
36
|
-
- lib/rubicus.rb
|
37
31
|
- lib/rubicus/graph.rb
|
38
|
-
- lib/rubicus/layers.rb
|
39
|
-
- lib/rubicus/version.rb
|
40
32
|
- lib/rubicus/layers/base.rb
|
41
33
|
- lib/rubicus/layers/custom.rb
|
42
34
|
- lib/rubicus/layers/prefab.rb
|
43
|
-
-
|
44
|
-
|
35
|
+
- lib/rubicus/layers.rb
|
36
|
+
- lib/rubicus/version.rb
|
37
|
+
- lib/rubicus.rb
|
38
|
+
- MIT-LICENSE
|
39
|
+
- CHANGES
|
40
|
+
- README
|
41
|
+
has_rdoc: true
|
42
|
+
homepage: https://github.com/daikini/rubicus
|
43
|
+
licenses: []
|
45
44
|
|
45
|
+
post_install_message:
|
46
46
|
rdoc_options: []
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
version: "0"
|
54
64
|
requirements: []
|
55
65
|
|
56
|
-
|
66
|
+
rubyforge_project: rubicus
|
67
|
+
rubygems_version: 1.3.6
|
68
|
+
signing_key:
|
69
|
+
specification_version: 3
|
70
|
+
summary: Graphing library for Ruby using the ploticus backend.
|
71
|
+
test_files: []
|
57
72
|
|
data/Rakefile
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
3
|
-
require 'rake/testtask'
|
4
|
-
require 'rake/rdoctask'
|
5
|
-
require 'rake/packagetask'
|
6
|
-
require 'rake/gempackagetask'
|
7
|
-
require 'rake/contrib/rubyforgepublisher'
|
8
|
-
require 'lib/rubicus'
|
9
|
-
|
10
|
-
PKG_NAME = "rubicus"
|
11
|
-
PKG_VERSION = Rubicus::VERSION
|
12
|
-
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
13
|
-
PKG_FILES = FileList[
|
14
|
-
'[A-Z]*',
|
15
|
-
'lib/**/*.rb',
|
16
|
-
'test/**/*.rb'
|
17
|
-
]
|
18
|
-
|
19
|
-
desc "Deploy docs to RubyForge"
|
20
|
-
task :rdoc_deploy => [:rdoc] do
|
21
|
-
dirs = %w{doc}
|
22
|
-
onserver = "poogle@rubyforge.org:/var/www/gforge-projects/rubicus"
|
23
|
-
dirs.each do | dir|
|
24
|
-
`scp -r "#{`pwd`.chomp}/#{dir}" "#{onserver}"`
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
# Genereate the RDoc documentation
|
29
|
-
Rake::RDocTask.new { |rdoc|
|
30
|
-
rdoc.rdoc_dir = 'doc'
|
31
|
-
rdoc.title = "Rubicus - Graphing Library for Ruby using the ploticus backend."
|
32
|
-
rdoc.rdoc_files.include("README", "CHANGELOG", "MIT-LICENSE")
|
33
|
-
rdoc.rdoc_files.include("lib/rubicus.rb")
|
34
|
-
rdoc.rdoc_files.include("lib/rubicus/*.rb")
|
35
|
-
rdoc.rdoc_files.include("lib/rubicus/layers/*.rb")
|
36
|
-
}
|
37
|
-
|
38
|
-
spec = Gem::Specification.new do |s|
|
39
|
-
s.name = PKG_NAME
|
40
|
-
s.version = PKG_VERSION
|
41
|
-
s.author = "Jonathan Younger"
|
42
|
-
s.email = "jonathan@daikini.com"
|
43
|
-
s.homepage = "http://rubicus.rubyforge.org"
|
44
|
-
s.summary = "Graphing library for Ruby using the ploticus backend."
|
45
|
-
s.description = "Rubicus is a pure Ruby wrapper around the ploticus http://ploticus.sourceforge.net graphing library."
|
46
|
-
s.files = PKG_FILES.to_a
|
47
|
-
s.has_rdoc = false
|
48
|
-
s.rubyforge_project = "rubicus"
|
49
|
-
end
|
50
|
-
|
51
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
52
|
-
pkg.need_zip = true
|
53
|
-
pkg.need_tar = true
|
54
|
-
end
|
55
|
-
|
56
|
-
task :verify_user do
|
57
|
-
raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
|
58
|
-
end
|
59
|
-
|
60
|
-
task :verify_password do
|
61
|
-
raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
|
62
|
-
end
|
63
|
-
|
64
|
-
desc "Publish gem+tgz+zip on RubyForge. You must make sure lib/version.rb is aligned with the CHANGELOG file"
|
65
|
-
task :publish_packages => [:verify_user, :verify_password, :package] do
|
66
|
-
require 'meta_project'
|
67
|
-
require 'rake/contrib/xforge'
|
68
|
-
release_files = FileList[
|
69
|
-
"pkg/#{PKG_FILE_NAME}.gem",
|
70
|
-
"pkg/#{PKG_FILE_NAME}.tgz",
|
71
|
-
"pkg/#{PKG_FILE_NAME}.zip",
|
72
|
-
"pkg/#{PKG_FILE_NAME}.gem.md5",
|
73
|
-
"pkg/#{PKG_FILE_NAME}.tgz.md5",
|
74
|
-
"pkg/#{PKG_FILE_NAME}.zip.md5"
|
75
|
-
]
|
76
|
-
|
77
|
-
Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |xf|
|
78
|
-
# Never hardcode user name and password in the Rakefile!
|
79
|
-
xf.user_name = ENV['RUBYFORGE_USER']
|
80
|
-
xf.password = ENV['RUBYFORGE_PASSWORD']
|
81
|
-
xf.files = release_files.to_a
|
82
|
-
xf.release_name = "Rubicus #{PKG_VERSION}"
|
83
|
-
end
|
84
|
-
end
|
data/test/test.rb
DELETED
@@ -1,131 +0,0 @@
|
|
1
|
-
#/usr/bin/env ruby
|
2
|
-
require File.dirname(__FILE__) + '/../lib/rubicus'
|
3
|
-
|
4
|
-
data = [
|
5
|
-
["Name", "Concentration", "PeakArea"],
|
6
|
-
["A", 1, 2],
|
7
|
-
["B", 2, 3],
|
8
|
-
["C", 2, 4],
|
9
|
-
["D", 1, 4],
|
10
|
-
["E", 6, 7]
|
11
|
-
]
|
12
|
-
|
13
|
-
# layer = Rubicus::Layers::Scat.new(:data => data, :xgrid => { :width => "0.1", :color => "gray(0.9)"}, :x => 2, :y => 3, :corr => true)
|
14
|
-
|
15
|
-
g = Rubicus::Graph.new
|
16
|
-
g.add :scat, data, :xgrid => { :width => "0.1", :color => "gray(0.9)" }, :x => 2, :y => 3, :corr => true, :rectangle => [1, 1, 3, 3]
|
17
|
-
g.add :scat, data, :xgrid => { :width => "0.6", :color => "gray(2.5)" }, :x => 2, :y => 3, :corr => true, :rectangle => [4, 1, 6, 3]
|
18
|
-
# g.add layer
|
19
|
-
g.render(:to => "bob.png")
|
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
|
-
layer = Rubicus::Layers::Custom.new
|
48
|
-
|
49
|
-
layer.data = [
|
50
|
-
[2000, 750],
|
51
|
-
[2010, 1700],
|
52
|
-
[2015, 2000],
|
53
|
-
[2020, 1800],
|
54
|
-
[2025, 1300],
|
55
|
-
[2030, 400]
|
56
|
-
]
|
57
|
-
|
58
|
-
layer.area {|a|
|
59
|
-
a.title = "Social Security trust fund asset estimates, in $ billions\nhallo\nsuper"
|
60
|
-
a.titledetails = {:adjust => "0,0.1"}
|
61
|
-
a.rectangle = [1, 1, 5, 2]
|
62
|
-
a.xrange = [2000, 2035]
|
63
|
-
a.yrange = [0, 2000]
|
64
|
-
}
|
65
|
-
|
66
|
-
layer.xaxis {|a|
|
67
|
-
a.stubs = "inc 5"
|
68
|
-
a.label = "Year"
|
69
|
-
}
|
70
|
-
|
71
|
-
layer.lineplot {|a|
|
72
|
-
a.xfield = 1
|
73
|
-
a.yfield = 2
|
74
|
-
a.fill = "pink"
|
75
|
-
}
|
76
|
-
|
77
|
-
layer.lineplot {|a|
|
78
|
-
a.xfield = 1
|
79
|
-
a.yfield = 2
|
80
|
-
a.fill = "rgb(.7,.3,.3)"
|
81
|
-
a.linerange = [2010, 2020]
|
82
|
-
}
|
83
|
-
|
84
|
-
layer.lineplot {|a|
|
85
|
-
a.xfield = 1
|
86
|
-
a.yfield = 2
|
87
|
-
a.linedetails = {:color => 'red'}
|
88
|
-
a.fill = "rgb(.7,.3,.3)"
|
89
|
-
a.linerange = [2010, 2020]
|
90
|
-
}
|
91
|
-
|
92
|
-
layer.yaxis {|a|
|
93
|
-
a.stubs = "incremental 500"
|
94
|
-
a.grid = {:color=> 'blue'}
|
95
|
-
a.axisline = 'none'
|
96
|
-
}
|
97
|
-
|
98
|
-
g = Rubicus::Graph.new
|
99
|
-
g.add layer
|
100
|
-
g.render(:to => "bob2.png")
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
g = Rubicus::Graph.new
|
110
|
-
g.add :lines, [[10, 20], [20, 30], [30, 40], [40, 50]], :title => "Jack", :x => 1, :y => 2, :pointsym => :none, :rectangle => [1, 1, 3, 3]
|
111
|
-
g.add :lines, [[10, 20], [20, 30], [30, 40], [40, 50]], :title => "Jill", :x => 1, :y => 2, :pointsym => :none, :rectangle => [4, 1, 6, 3]
|
112
|
-
g.render :to => "hmm.png"
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
data = (1..12).collect { |i| ["Test #{i}", rand(110), rand(20)] }
|
121
|
-
|
122
|
-
g = Rubicus::Graph.new
|
123
|
-
g.add :vbars, data, :x => 1, :y => 2, :autow => false, :errunder => true, :ygrid => true, :barwidth => :line, :stubvert => true, :xaxis => :none, :yaxis => :none, :rectangle => [0, 0, 0.5, 0.2], :legend => false, :header => false, :yrange => 110
|
124
|
-
g.render(:to => "sweet.png")
|
125
|
-
|
126
|
-
|
127
|
-
# data = (1..12).collect { |i| [i, rand(20)] }
|
128
|
-
#
|
129
|
-
# g = Rubicus::Graph.new
|
130
|
-
# g.add :line, data, :x => 1, :y => 2, :pointsym => :none, :xaxis => :none
|
131
|
-
# g.render(:to => "sweet.png")
|