ctioga2 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/Changelog +11 -0
  2. data/lib/ctioga2/commands/arguments.rb +1 -1
  3. data/lib/ctioga2/commands/commands.rb +1 -1
  4. data/lib/ctioga2/commands/doc/doc.rb +1 -1
  5. data/lib/ctioga2/commands/doc/documentation-commands.rb +1 -1
  6. data/lib/ctioga2/commands/doc/help.rb +1 -1
  7. data/lib/ctioga2/commands/doc/html.rb +1 -1
  8. data/lib/ctioga2/commands/doc/introspection.rb +1 -1
  9. data/lib/ctioga2/commands/doc/man.rb +1 -1
  10. data/lib/ctioga2/commands/doc/markup.rb +1 -1
  11. data/lib/ctioga2/commands/doc/wordwrap.rb +1 -1
  12. data/lib/ctioga2/commands/general-commands.rb +1 -1
  13. data/lib/ctioga2/commands/general-types.rb +1 -1
  14. data/lib/ctioga2/commands/groups.rb +1 -1
  15. data/lib/ctioga2/commands/interpreter.rb +8 -2
  16. data/lib/ctioga2/commands/parsers/command-line.rb +1 -1
  17. data/lib/ctioga2/commands/parsers/file.rb +4 -1
  18. data/lib/ctioga2/commands/strings.rb +1 -1
  19. data/lib/ctioga2/commands/type.rb +1 -1
  20. data/lib/ctioga2/commands/variables.rb +6 -6
  21. data/lib/ctioga2/data/backends/backend.rb +1 -1
  22. data/lib/ctioga2/data/backends/backends.rb +3 -2
  23. data/lib/ctioga2/data/backends/backends/direct.rb +72 -0
  24. data/lib/ctioga2/data/backends/backends/gnuplot.rb +1 -1
  25. data/lib/ctioga2/data/backends/backends/math.rb +1 -1
  26. data/lib/ctioga2/data/backends/backends/text.rb +8 -14
  27. data/lib/ctioga2/data/backends/description.rb +9 -5
  28. data/lib/ctioga2/data/backends/factory.rb +1 -1
  29. data/lib/ctioga2/data/backends/parameter.rb +1 -1
  30. data/lib/ctioga2/data/datacolumn.rb +1 -1
  31. data/lib/ctioga2/data/dataset.rb +50 -4
  32. data/lib/ctioga2/data/filters.rb +1 -1
  33. data/lib/ctioga2/data/indexed-dtable.rb +1 -1
  34. data/lib/ctioga2/data/point.rb +1 -1
  35. data/lib/ctioga2/data/stack.rb +151 -25
  36. data/lib/ctioga2/git-fools-svn.rb +7 -0
  37. data/lib/ctioga2/graphics/coordinates.rb +1 -1
  38. data/lib/ctioga2/graphics/elements.rb +1 -1
  39. data/lib/ctioga2/graphics/elements/containers.rb +1 -1
  40. data/lib/ctioga2/graphics/elements/contour.rb +5 -2
  41. data/lib/ctioga2/graphics/elements/curve2d.rb +1 -1
  42. data/lib/ctioga2/graphics/elements/element.rb +1 -1
  43. data/lib/ctioga2/graphics/elements/gradient-region.rb +1 -1
  44. data/lib/ctioga2/graphics/elements/parametric2d.rb +1 -2
  45. data/lib/ctioga2/graphics/elements/primitive.rb +1 -1
  46. data/lib/ctioga2/graphics/elements/redirecting-container.rb~ +123 -0
  47. data/lib/ctioga2/graphics/elements/region.rb +1 -1
  48. data/lib/ctioga2/graphics/elements/subplot.rb +1 -1
  49. data/lib/ctioga2/graphics/elements/tangent.rb +1 -1
  50. data/lib/ctioga2/graphics/elements/xyz-map.rb +1 -1
  51. data/lib/ctioga2/graphics/generator.rb +21 -4
  52. data/lib/ctioga2/graphics/legends.rb +1 -1
  53. data/lib/ctioga2/graphics/legends/area.rb +1 -1
  54. data/lib/ctioga2/graphics/legends/items.rb +1 -1
  55. data/lib/ctioga2/graphics/legends/provider.rb +1 -1
  56. data/lib/ctioga2/graphics/legends/storage.rb +1 -1
  57. data/lib/ctioga2/graphics/root.rb +1 -1
  58. data/lib/ctioga2/graphics/styles/axes.rb +2 -1
  59. data/lib/ctioga2/graphics/styles/background.rb +1 -1
  60. data/lib/ctioga2/graphics/styles/base.rb +1 -1
  61. data/lib/ctioga2/graphics/styles/carrays.rb +1 -1
  62. data/lib/ctioga2/graphics/styles/colormap.rb +1 -1
  63. data/lib/ctioga2/graphics/styles/curve.rb +1 -1
  64. data/lib/ctioga2/graphics/styles/drawable.rb +1 -1
  65. data/lib/ctioga2/graphics/styles/errorbar.rb +1 -1
  66. data/lib/ctioga2/graphics/styles/factory.rb +1 -1
  67. data/lib/ctioga2/graphics/styles/gradients.rb +1 -1
  68. data/lib/ctioga2/graphics/styles/legend.rb +1 -1
  69. data/lib/ctioga2/graphics/styles/location.rb +1 -1
  70. data/lib/ctioga2/graphics/styles/plot.rb +10 -1
  71. data/lib/ctioga2/graphics/styles/sets.rb +1 -1
  72. data/lib/ctioga2/graphics/styles/texts.rb +1 -1
  73. data/lib/ctioga2/graphics/subplot-commands.rb +1 -1
  74. data/lib/ctioga2/graphics/types.rb +1 -1
  75. data/lib/ctioga2/graphics/types/bijection.rb +1 -1
  76. data/lib/ctioga2/graphics/types/boundaries.rb +1 -1
  77. data/lib/ctioga2/graphics/types/boxes.rb +1 -1
  78. data/lib/ctioga2/graphics/types/dimensions.rb +1 -1
  79. data/lib/ctioga2/graphics/types/grid.rb +1 -1
  80. data/lib/ctioga2/graphics/types/location.rb +1 -1
  81. data/lib/ctioga2/graphics/types/point.rb +1 -1
  82. data/lib/ctioga2/log.rb +4 -1
  83. data/lib/ctioga2/metabuilder/type.rb +1 -1
  84. data/lib/ctioga2/metabuilder/types/coordinates.rb +1 -1
  85. data/lib/ctioga2/metabuilder/types/data.rb +1 -1
  86. data/lib/ctioga2/metabuilder/types/dates.rb +1 -1
  87. data/lib/ctioga2/metabuilder/types/generic.rb~ +225 -0
  88. data/lib/ctioga2/metabuilder/types/lists.rb +1 -1
  89. data/lib/ctioga2/metabuilder/types/numbers.rb +1 -1
  90. data/lib/ctioga2/metabuilder/types/strings.rb +1 -1
  91. data/lib/ctioga2/metabuilder/types/styles.rb +1 -1
  92. data/lib/ctioga2/plotmaker.rb +12 -7
  93. data/lib/ctioga2/postprocess.rb +1 -1
  94. data/lib/ctioga2/utils.rb +27 -3
  95. metadata +45 -56
@@ -19,7 +19,7 @@ require 'ctioga2/utils'
19
19
 
20
20
  module CTioga2
21
21
 
22
- Version::register_svn_info('$Revision: 2 $', '$Date: 2009-04-25 14:03:30 +0200 (Sat, 25 Apr 2009) $')
22
+ Version::register_svn_info('$Revision$', '$Date$')
23
23
 
24
24
 
25
25
  module MetaBuilder
@@ -20,7 +20,7 @@ require 'ctioga2/utils'
20
20
 
21
21
  module CTioga2
22
22
 
23
- Version::register_svn_info('$Revision: 222 $', '$Date: 2011-01-11 00:52:31 +0100 (Tue, 11 Jan 2011) $')
23
+ Version::register_svn_info('$Revision$', '$Date$')
24
24
 
25
25
  module MetaBuilder
26
26
  module Types
@@ -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: 244 $', '$Date: 2011-01-23 23:36:02 +0100 (Sun, 23 Jan 2011) $')
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') ],
@@ -17,7 +17,7 @@ require 'ctioga2/log'
17
17
 
18
18
  module CTioga2
19
19
 
20
- Version::register_svn_info('$Revision: 155 $', '$Date: 2010-06-21 21:41:32 +0200 (Mon, 21 Jun 2010) $')
20
+ Version::register_svn_info('$Revision$', '$Date$')
21
21
 
22
22
  # What happens to generated PDF files ?
23
23
  #
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: 286 $', '$Date: 2011-02-22 21:12:50 +0100 (Tue, 22 Feb 2011) $')
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: svn+ssh://rubyforge.org/var/svn/ctioga2/releases/ctioga2-0.2/lib/ctioga2/utils.rb $'
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: 286 $', '$Date: 2011-02-22 21:12:50 +0100 (Tue, 22 Feb 2011) $')
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
- hash: 15
5
- prerelease: false
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
- date: 2011-02-23 00:00:00 +01:00
18
- default_executable:
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
- prerelease: false
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
- hash: 21
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
- version_requirements: *id001
35
- description: |
36
- ctioga2 is a command-driven plotting program that produces
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
- hash: 3
163
- segments:
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
- hash: 3
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.3.7
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
-