ctioga2 0.2 → 0.3
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/Changelog +11 -0
- data/lib/ctioga2/commands/arguments.rb +1 -1
- data/lib/ctioga2/commands/commands.rb +1 -1
- data/lib/ctioga2/commands/doc/doc.rb +1 -1
- data/lib/ctioga2/commands/doc/documentation-commands.rb +1 -1
- data/lib/ctioga2/commands/doc/help.rb +1 -1
- data/lib/ctioga2/commands/doc/html.rb +1 -1
- data/lib/ctioga2/commands/doc/introspection.rb +1 -1
- data/lib/ctioga2/commands/doc/man.rb +1 -1
- data/lib/ctioga2/commands/doc/markup.rb +1 -1
- data/lib/ctioga2/commands/doc/wordwrap.rb +1 -1
- data/lib/ctioga2/commands/general-commands.rb +1 -1
- data/lib/ctioga2/commands/general-types.rb +1 -1
- data/lib/ctioga2/commands/groups.rb +1 -1
- data/lib/ctioga2/commands/interpreter.rb +8 -2
- data/lib/ctioga2/commands/parsers/command-line.rb +1 -1
- data/lib/ctioga2/commands/parsers/file.rb +4 -1
- data/lib/ctioga2/commands/strings.rb +1 -1
- data/lib/ctioga2/commands/type.rb +1 -1
- data/lib/ctioga2/commands/variables.rb +6 -6
- data/lib/ctioga2/data/backends/backend.rb +1 -1
- data/lib/ctioga2/data/backends/backends.rb +3 -2
- data/lib/ctioga2/data/backends/backends/direct.rb +72 -0
- data/lib/ctioga2/data/backends/backends/gnuplot.rb +1 -1
- data/lib/ctioga2/data/backends/backends/math.rb +1 -1
- data/lib/ctioga2/data/backends/backends/text.rb +8 -14
- data/lib/ctioga2/data/backends/description.rb +9 -5
- data/lib/ctioga2/data/backends/factory.rb +1 -1
- data/lib/ctioga2/data/backends/parameter.rb +1 -1
- data/lib/ctioga2/data/datacolumn.rb +1 -1
- data/lib/ctioga2/data/dataset.rb +50 -4
- data/lib/ctioga2/data/filters.rb +1 -1
- data/lib/ctioga2/data/indexed-dtable.rb +1 -1
- data/lib/ctioga2/data/point.rb +1 -1
- data/lib/ctioga2/data/stack.rb +151 -25
- data/lib/ctioga2/git-fools-svn.rb +7 -0
- data/lib/ctioga2/graphics/coordinates.rb +1 -1
- data/lib/ctioga2/graphics/elements.rb +1 -1
- data/lib/ctioga2/graphics/elements/containers.rb +1 -1
- data/lib/ctioga2/graphics/elements/contour.rb +5 -2
- data/lib/ctioga2/graphics/elements/curve2d.rb +1 -1
- data/lib/ctioga2/graphics/elements/element.rb +1 -1
- data/lib/ctioga2/graphics/elements/gradient-region.rb +1 -1
- data/lib/ctioga2/graphics/elements/parametric2d.rb +1 -2
- data/lib/ctioga2/graphics/elements/primitive.rb +1 -1
- data/lib/ctioga2/graphics/elements/redirecting-container.rb~ +123 -0
- data/lib/ctioga2/graphics/elements/region.rb +1 -1
- data/lib/ctioga2/graphics/elements/subplot.rb +1 -1
- data/lib/ctioga2/graphics/elements/tangent.rb +1 -1
- data/lib/ctioga2/graphics/elements/xyz-map.rb +1 -1
- data/lib/ctioga2/graphics/generator.rb +21 -4
- data/lib/ctioga2/graphics/legends.rb +1 -1
- data/lib/ctioga2/graphics/legends/area.rb +1 -1
- data/lib/ctioga2/graphics/legends/items.rb +1 -1
- data/lib/ctioga2/graphics/legends/provider.rb +1 -1
- data/lib/ctioga2/graphics/legends/storage.rb +1 -1
- data/lib/ctioga2/graphics/root.rb +1 -1
- data/lib/ctioga2/graphics/styles/axes.rb +2 -1
- data/lib/ctioga2/graphics/styles/background.rb +1 -1
- data/lib/ctioga2/graphics/styles/base.rb +1 -1
- data/lib/ctioga2/graphics/styles/carrays.rb +1 -1
- data/lib/ctioga2/graphics/styles/colormap.rb +1 -1
- data/lib/ctioga2/graphics/styles/curve.rb +1 -1
- data/lib/ctioga2/graphics/styles/drawable.rb +1 -1
- data/lib/ctioga2/graphics/styles/errorbar.rb +1 -1
- data/lib/ctioga2/graphics/styles/factory.rb +1 -1
- data/lib/ctioga2/graphics/styles/gradients.rb +1 -1
- data/lib/ctioga2/graphics/styles/legend.rb +1 -1
- data/lib/ctioga2/graphics/styles/location.rb +1 -1
- data/lib/ctioga2/graphics/styles/plot.rb +10 -1
- data/lib/ctioga2/graphics/styles/sets.rb +1 -1
- data/lib/ctioga2/graphics/styles/texts.rb +1 -1
- data/lib/ctioga2/graphics/subplot-commands.rb +1 -1
- data/lib/ctioga2/graphics/types.rb +1 -1
- data/lib/ctioga2/graphics/types/bijection.rb +1 -1
- data/lib/ctioga2/graphics/types/boundaries.rb +1 -1
- data/lib/ctioga2/graphics/types/boxes.rb +1 -1
- data/lib/ctioga2/graphics/types/dimensions.rb +1 -1
- data/lib/ctioga2/graphics/types/grid.rb +1 -1
- data/lib/ctioga2/graphics/types/location.rb +1 -1
- data/lib/ctioga2/graphics/types/point.rb +1 -1
- data/lib/ctioga2/log.rb +4 -1
- data/lib/ctioga2/metabuilder/type.rb +1 -1
- data/lib/ctioga2/metabuilder/types/coordinates.rb +1 -1
- data/lib/ctioga2/metabuilder/types/data.rb +1 -1
- data/lib/ctioga2/metabuilder/types/dates.rb +1 -1
- data/lib/ctioga2/metabuilder/types/generic.rb~ +225 -0
- data/lib/ctioga2/metabuilder/types/lists.rb +1 -1
- data/lib/ctioga2/metabuilder/types/numbers.rb +1 -1
- data/lib/ctioga2/metabuilder/types/strings.rb +1 -1
- data/lib/ctioga2/metabuilder/types/styles.rb +1 -1
- data/lib/ctioga2/plotmaker.rb +12 -7
- data/lib/ctioga2/postprocess.rb +1 -1
- data/lib/ctioga2/utils.rb +27 -3
- metadata +45 -56
data/lib/ctioga2/plotmaker.rb
CHANGED
|
@@ -102,6 +102,8 @@
|
|
|
102
102
|
require 'ctioga2/utils'
|
|
103
103
|
require 'ctioga2/log'
|
|
104
104
|
|
|
105
|
+
CTioga2::Log::init_logger
|
|
106
|
+
|
|
105
107
|
require 'shellwords'
|
|
106
108
|
|
|
107
109
|
# Maybe, maybe, maybe... We need tioga ?
|
|
@@ -146,9 +148,14 @@ require 'ctioga2/postprocess'
|
|
|
146
148
|
# * CTioga2::Data
|
|
147
149
|
#
|
|
148
150
|
# Have fun hacking...
|
|
151
|
+
#
|
|
152
|
+
# \section todo Various things and ideas...
|
|
153
|
+
#
|
|
154
|
+
# @li have a way to make one axis scale slave to another one (ie, for
|
|
155
|
+
# displays of rate constants vs potentials)
|
|
149
156
|
module CTioga2
|
|
150
157
|
|
|
151
|
-
Version::register_svn_info('$Revision
|
|
158
|
+
Version::register_svn_info('$Revision$', '$Date$')
|
|
152
159
|
|
|
153
160
|
# This class is the core of ctioga. It parses the command-line arguments,
|
|
154
161
|
# reads all necessary files and plots graphs. Most of its functionality
|
|
@@ -388,12 +395,6 @@ module CTioga2
|
|
|
388
395
|
return
|
|
389
396
|
end
|
|
390
397
|
for set in sets
|
|
391
|
-
# We first trim elements from options that are not inside
|
|
392
|
-
# Graphics::Styles::CurveStyleFactory::PlotCommandOptions
|
|
393
|
-
options.delete_if { |k,v|
|
|
394
|
-
! Graphics::Styles::
|
|
395
|
-
CurveStyleFactory::PlotCommandOptions.key?(k)
|
|
396
|
-
}
|
|
397
398
|
add_curve(set, options)
|
|
398
399
|
end
|
|
399
400
|
end
|
|
@@ -442,6 +443,10 @@ module CTioga2
|
|
|
442
443
|
raise "Duplicated option between PlotCommandOptions and LoadDatasetOptions"
|
|
443
444
|
end
|
|
444
445
|
|
|
446
|
+
PlotOptions.merge!(Graphics::CurveGenerator::PlotOptions) do |key, oldval, newval|
|
|
447
|
+
raise "Duplicated option between PlotCommandOptions and LoadDatasetOptions"
|
|
448
|
+
end
|
|
449
|
+
|
|
445
450
|
PlotCommand =
|
|
446
451
|
Cmd.new("plot",nil,"--plot",
|
|
447
452
|
[ CmdArg.new('dataset') ],
|
data/lib/ctioga2/postprocess.rb
CHANGED
data/lib/ctioga2/utils.rb
CHANGED
|
@@ -34,7 +34,7 @@ module CTioga2
|
|
|
34
34
|
# arguments and have the Date and Revision svn:keyword:. Use this
|
|
35
35
|
# way:
|
|
36
36
|
#
|
|
37
|
-
# Version::register_svn_info('$Revision
|
|
37
|
+
# Version::register_svn_info('$Revision$', '$Date$')
|
|
38
38
|
#
|
|
39
39
|
# To set the correct properties, the following command-line can be
|
|
40
40
|
# used:
|
|
@@ -74,7 +74,7 @@ module CTioga2
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
# The position of the URL, used for getting the version
|
|
77
|
-
SVN_URL = '$HeadURL
|
|
77
|
+
SVN_URL = '$HeadURL$'
|
|
78
78
|
|
|
79
79
|
# The version of ctioga2
|
|
80
80
|
CTIOGA_VERSION = if SVN_URL =~ /releases\/ctioga2-([^\/]+)/
|
|
@@ -83,7 +83,7 @@ module CTioga2
|
|
|
83
83
|
"SVN version"
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
register_svn_info('$Revision
|
|
86
|
+
register_svn_info('$Revision$', '$Date$')
|
|
87
87
|
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -137,6 +137,30 @@ module CTioga2
|
|
|
137
137
|
k.downto(1) {|i| res = res/i }
|
|
138
138
|
return res
|
|
139
139
|
end
|
|
140
|
+
|
|
141
|
+
# This converts a text formula that can contain:
|
|
142
|
+
# * any litteral thing
|
|
143
|
+
# * references to columns in the form of \$1 for column 1 (ie the
|
|
144
|
+
# second one)
|
|
145
|
+
# * references to named columns in the form $name$
|
|
146
|
+
# * references to parameters
|
|
147
|
+
#
|
|
148
|
+
# The return value is ready to be passed to Dvector.compute_formula
|
|
149
|
+
def self.parse_formula(formula, parameters = nil, header = nil)
|
|
150
|
+
formula = formula.dup
|
|
151
|
+
if parameters
|
|
152
|
+
for k,v in parameters
|
|
153
|
+
formula.gsub!(/\b#{k}\b/, v.to_s)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
formula.gsub!(/\$(\d+)/, 'column[\1]')
|
|
157
|
+
if header
|
|
158
|
+
for k,v in header
|
|
159
|
+
formula.gsub!("$#{k}$", "column[#{v}]")
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
return formula
|
|
163
|
+
end
|
|
140
164
|
|
|
141
165
|
|
|
142
166
|
end
|
metadata
CHANGED
|
@@ -1,52 +1,48 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ctioga2
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
prerelease:
|
|
6
|
-
segments:
|
|
7
|
-
- 0
|
|
8
|
-
- 2
|
|
9
|
-
version: "0.2"
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: '0.3'
|
|
5
|
+
prerelease:
|
|
10
6
|
platform: ruby
|
|
11
|
-
authors:
|
|
7
|
+
authors:
|
|
12
8
|
- Vincent Fourmond <vincent.fourmond@9online.fr>
|
|
13
9
|
autorequire:
|
|
14
10
|
bindir: bin
|
|
15
11
|
cert_chain: []
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
dependencies:
|
|
20
|
-
- !ruby/object:Gem::Dependency
|
|
12
|
+
date: 2012-09-03 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
21
15
|
name: tioga
|
|
22
|
-
|
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
24
17
|
none: false
|
|
25
|
-
requirements:
|
|
26
|
-
- -
|
|
27
|
-
- !ruby/object:Gem::Version
|
|
28
|
-
|
|
29
|
-
segments:
|
|
30
|
-
- 1
|
|
31
|
-
- 13
|
|
32
|
-
version: "1.13"
|
|
18
|
+
requirements:
|
|
19
|
+
- - ! '>='
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '1.15'
|
|
33
22
|
type: :runtime
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ! '>='
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '1.15'
|
|
30
|
+
description: ! 'ctioga2 is a command-driven plotting program that produces
|
|
31
|
+
|
|
37
32
|
high quality PDF files. It can be used both from the command-line
|
|
33
|
+
|
|
38
34
|
and using command files (at the same time).
|
|
39
|
-
|
|
40
|
-
It is based on Tioga.
|
|
41
35
|
|
|
36
|
+
|
|
37
|
+
It is based on Tioga (http://tioga.rubyforge.org).
|
|
38
|
+
|
|
39
|
+
'
|
|
42
40
|
email: vincent.fourmond@9online.fr
|
|
43
|
-
executables:
|
|
41
|
+
executables:
|
|
44
42
|
- ctioga2
|
|
45
43
|
extensions: []
|
|
46
|
-
|
|
47
44
|
extra_rdoc_files: []
|
|
48
|
-
|
|
49
|
-
files:
|
|
45
|
+
files:
|
|
50
46
|
- lib/ctioga2/data/indexed-dtable.rb
|
|
51
47
|
- lib/ctioga2/data/datacolumn.rb
|
|
52
48
|
- lib/ctioga2/data/point.rb
|
|
@@ -61,6 +57,7 @@ files:
|
|
|
61
57
|
- lib/ctioga2/data/backends/backends/math.rb
|
|
62
58
|
- lib/ctioga2/data/backends/backends/text.rb
|
|
63
59
|
- lib/ctioga2/data/backends/backends/gnuplot.rb
|
|
60
|
+
- lib/ctioga2/data/backends/backends/direct.rb
|
|
64
61
|
- lib/ctioga2/log.rb
|
|
65
62
|
- lib/ctioga2/plotmaker.rb
|
|
66
63
|
- lib/ctioga2/commands/type.rb
|
|
@@ -107,6 +104,7 @@ files:
|
|
|
107
104
|
- lib/ctioga2/graphics/legends/provider.rb
|
|
108
105
|
- lib/ctioga2/graphics/types.rb
|
|
109
106
|
- lib/ctioga2/graphics/elements/subplot.rb
|
|
107
|
+
- lib/ctioga2/graphics/elements/redirecting-container.rb~
|
|
110
108
|
- lib/ctioga2/graphics/elements/parametric2d.rb
|
|
111
109
|
- lib/ctioga2/graphics/elements/redirecting-container.rb
|
|
112
110
|
- lib/ctioga2/graphics/elements/primitive.rb
|
|
@@ -130,6 +128,7 @@ files:
|
|
|
130
128
|
- lib/ctioga2/graphics/types/grid.rb
|
|
131
129
|
- lib/ctioga2/graphics/root.rb
|
|
132
130
|
- lib/ctioga2/utils.rb
|
|
131
|
+
- lib/ctioga2/git-fools-svn.rb
|
|
133
132
|
- lib/ctioga2/postprocess.rb
|
|
134
133
|
- lib/ctioga2/metabuilder/type.rb
|
|
135
134
|
- lib/ctioga2/metabuilder/types.rb
|
|
@@ -139,45 +138,35 @@ files:
|
|
|
139
138
|
- lib/ctioga2/metabuilder/types/styles.rb
|
|
140
139
|
- lib/ctioga2/metabuilder/types/strings.rb
|
|
141
140
|
- lib/ctioga2/metabuilder/types/coordinates.rb
|
|
141
|
+
- lib/ctioga2/metabuilder/types/generic.rb~
|
|
142
142
|
- lib/ctioga2/metabuilder/types/data.rb
|
|
143
143
|
- lib/ctioga2/metabuilder/types/generic.rb
|
|
144
144
|
- COPYING
|
|
145
145
|
- Changelog
|
|
146
146
|
- setup.rb
|
|
147
147
|
- bin/ctioga2
|
|
148
|
-
has_rdoc: true
|
|
149
148
|
homepage: http://ctioga2.rubyforge.org
|
|
150
149
|
licenses: []
|
|
151
|
-
|
|
152
150
|
post_install_message:
|
|
153
151
|
rdoc_options: []
|
|
154
|
-
|
|
155
|
-
require_paths:
|
|
152
|
+
require_paths:
|
|
156
153
|
- lib
|
|
157
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
155
|
none: false
|
|
159
|
-
requirements:
|
|
160
|
-
- -
|
|
161
|
-
- !ruby/object:Gem::Version
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
- 0
|
|
165
|
-
version: "0"
|
|
166
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - ! '>='
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '0'
|
|
160
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
161
|
none: false
|
|
168
|
-
requirements:
|
|
169
|
-
- -
|
|
170
|
-
- !ruby/object:Gem::Version
|
|
171
|
-
|
|
172
|
-
segments:
|
|
173
|
-
- 0
|
|
174
|
-
version: "0"
|
|
162
|
+
requirements:
|
|
163
|
+
- - ! '>='
|
|
164
|
+
- !ruby/object:Gem::Version
|
|
165
|
+
version: '0'
|
|
175
166
|
requirements: []
|
|
176
|
-
|
|
177
167
|
rubyforge_project: ctioga2
|
|
178
|
-
rubygems_version: 1.
|
|
168
|
+
rubygems_version: 1.8.23
|
|
179
169
|
signing_key:
|
|
180
170
|
specification_version: 3
|
|
181
171
|
summary: ctioga2 - the polymorphic plotting program
|
|
182
172
|
test_files: []
|
|
183
|
-
|