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
@@ -20,7 +20,7 @@ require 'ctioga2/data/backends/backend'
20
20
 
21
21
  module CTioga2
22
22
 
23
- Version::register_svn_info('$Revision: 2 $', '$Date: 2009-04-25 14:03:30 +0200 (Sat, 25 Apr 2009) $')
23
+ Version::register_svn_info('$Revision$', '$Date$')
24
24
 
25
25
  module Data
26
26
 
@@ -21,7 +21,7 @@ require 'ctioga2/metabuilder/type'
21
21
 
22
22
  module CTioga2
23
23
 
24
- Version::register_svn_info('$Revision: 17 $', '$Date: 2009-04-28 22:22:22 +0200 (Tue, 28 Apr 2009) $')
24
+ Version::register_svn_info('$Revision$', '$Date$')
25
25
 
26
26
  module Data
27
27
 
@@ -17,7 +17,7 @@ require 'ctioga2/utils'
17
17
  # This module contains all the classes used by ctioga
18
18
  module CTioga2
19
19
 
20
- Version::register_svn_info('$Revision: 229 $', '$Date: 2011-01-17 17:34:57 +0100 (Mon, 17 Jan 2011) $')
20
+ Version::register_svn_info('$Revision$', '$Date$')
21
21
 
22
22
  module Data
23
23
 
@@ -12,12 +12,13 @@
12
12
  # GNU General Public License for more details (in the COPYING file).
13
13
 
14
14
  require 'ctioga2/utils'
15
+ require 'ctioga2/log'
15
16
  require 'ctioga2/data/datacolumn'
16
17
  require 'ctioga2/data/indexed-dtable'
17
18
 
18
19
  module CTioga2
19
20
 
20
- Version::register_svn_info('$Revision: 233 $', '$Date: 2011-01-20 10:26:42 +0100 (Thu, 20 Jan 2011) $')
21
+ Version::register_svn_info('$Revision$', '$Date$')
21
22
 
22
23
 
23
24
  # \todo now, port the backend infrastructure...
@@ -43,6 +44,8 @@ module CTioga2
43
44
  # legend (like for the --auto-legend option of ctioga).
44
45
  attr_accessor :name
45
46
 
47
+ include Log
48
+
46
49
  # Creates a new Dataset object with the given data columns
47
50
  # (Dvector or DataColumn). #x is the first one
48
51
  def initialize(name, columns)
@@ -298,6 +301,43 @@ module CTioga2
298
301
 
299
302
  end
300
303
 
304
+ # Applies formulas to values. Formulas are like text-backend
305
+ # specification: ":"-separated specs of the target
306
+ def apply_formulas(formula)
307
+ columns = []
308
+ columns << Dobjects::Dvector.new(@x.size) do |i|
309
+ i
310
+ end
311
+ columns << @x.values
312
+ for y in @ys
313
+ columns << y.values
314
+ end
315
+
316
+ # Names:
317
+ heads = {
318
+ 'x' => 1,
319
+ 'y' => 2,
320
+ 'z' => 3,
321
+ }
322
+ i = 1
323
+ for f in @ys
324
+ heads["y#{i}"] = i+1
325
+ i += 1
326
+ end
327
+
328
+ result = []
329
+ for f in formula.split(/:/) do
330
+ fm = Utils::parse_formula(f, nil, heads)
331
+ debug {
332
+ "Using formula #{fm} for column spec: #{f} (##{result.size})"
333
+ }
334
+ result << DataColumn.new(Dobjects::Dvector.
335
+ compute_formula(fm,
336
+ columns))
337
+ end
338
+ return Dataset.new(name + "_mod", result)
339
+ end
340
+
301
341
 
302
342
  # Returns an IndexedDTable representing the XYZ
303
343
  # data. Information about errors are not included.
@@ -349,14 +389,20 @@ module CTioga2
349
389
  return @indexed_dtable
350
390
  end
351
391
 
352
- # Returns a x,y Function
392
+ # Returns a x,y Function
393
+ #
394
+ # @todo add algorithm
353
395
  def make_contour(level)
354
396
  dtable = indexed_table
355
397
  x,y,gaps = *dtable.make_contour(level)
398
+
399
+ # We remove any gap corresponding to the element size,
400
+ # meaningless.
401
+ gaps -= [x.size]
356
402
  n = 0.0/0.0
357
403
  gaps.sort.reverse.each do |i|
358
- x.insert(i-1,n)
359
- y.insert(i-1,n)
404
+ x.insert(i,n)
405
+ y.insert(i,n)
360
406
  end
361
407
  return Dobjects::Function.new(x,y)
362
408
  end
@@ -19,7 +19,7 @@ require 'ctioga2/data/backends/factory'
19
19
  # This module contains all the classes used by ctioga
20
20
  module CTioga2
21
21
 
22
- Version::register_svn_info('$Revision: 194 $', '$Date: 2010-11-22 10:26:54 +0100 (Mon, 22 Nov 2010) $')
22
+ Version::register_svn_info('$Revision$', '$Date$')
23
23
 
24
24
 
25
25
  module Data
@@ -15,7 +15,7 @@ require 'ctioga2/utils'
15
15
 
16
16
  module CTioga2
17
17
 
18
- Version::register_svn_info('$Revision: 181 $', '$Date: 2010-10-27 15:18:35 +0200 (Wed, 27 Oct 2010) $')
18
+ Version::register_svn_info('$Revision$', '$Date$')
19
19
 
20
20
 
21
21
  module Data
@@ -17,7 +17,7 @@ require 'ctioga2/data/dataset'
17
17
 
18
18
  module CTioga2
19
19
 
20
- Version::register_svn_info('$Revision: 112 $', '$Date: 2009-11-09 22:34:12 +0100 (Mon, 09 Nov 2009) $')
20
+ Version::register_svn_info('$Revision$', '$Date$')
21
21
 
22
22
 
23
23
  module Data
@@ -25,7 +25,7 @@ require 'ctioga2/data/filters'
25
25
  # This module contains all the classes used by ctioga
26
26
  module CTioga2
27
27
 
28
- Version::register_svn_info('$Revision: 233 $', '$Date: 2011-01-20 10:26:42 +0100 (Thu, 20 Jan 2011) $')
28
+ Version::register_svn_info('$Revision$', '$Date$')
29
29
 
30
30
 
31
31
  module Data
@@ -80,8 +80,14 @@ module CTioga2
80
80
  def get_datasets(set, options = {})
81
81
  backend = @backend_factory.current
82
82
  sets = backend.expand_sets(set)
83
- datasets = sets.map do |s|
84
- backend.dataset(s)
83
+ datasets = []
84
+ for s in sets
85
+ begin
86
+ datasets << backend.dataset(s)
87
+ rescue Exception => e
88
+ error { "Could not load dataset #{s} -- #{e}" }
89
+ debug { "#{e.backtrace.join("\n")}" }
90
+ end
85
91
  end
86
92
  add_datasets(datasets, options)
87
93
  return datasets
@@ -157,6 +163,25 @@ module CTioga2
157
163
  end
158
164
  end
159
165
 
166
+ # Returns a list of datasets, either a named dataset, or the
167
+ # last datasets from the stack
168
+ def latest_datasets(opts)
169
+ if opts['which']
170
+ if opts['number']
171
+ warn { "Cannot use both which and number" }
172
+ end
173
+ datasets = [ specified_dataset(opts) ]
174
+ else
175
+ nb = opts['number'] || 2
176
+ if stack.stack.size < nb
177
+ raise "Not enough datasets on the stack"
178
+ end
179
+ datasets = stack.stack[(- nb).. -2]
180
+ datasets.reverse!
181
+ end
182
+ end
183
+
184
+
160
185
  # Appends a set of commands to the dataset hook
161
186
  def add_to_dataset_hook(commands)
162
187
  if @dataset_hook
@@ -176,25 +201,25 @@ module CTioga2
176
201
  end
177
202
  end
178
203
 
179
- # Pops the last _n_ datasets off the stack and pushes back the
180
- def concatenate_datasets(n = 2)
204
+ # Add all the given datasets to the current one.
205
+ def concatenate_datasets(datasets, name = nil)
181
206
  ds = @stack.pop
182
207
  raise "Nothing on the stack" unless ds
183
- (n-1).times do
184
- ds2 = @stack.pop
185
- raise "Not enough datasets on the stack" unless ds2
208
+
209
+ for ds2 in datasets
186
210
  ds << ds2
187
211
  end
188
212
  @stack.push(ds)
213
+ # Name the dataset
214
+ @named_datasets[name] = ds if name
189
215
  end
190
216
 
191
- # Merges the last datasets into a new one.
217
+ # Merges one or more datasets into the last one.
192
218
  #
193
- # Over
194
- def merge_datasets(n = 2, columns = [0], precision = nil)
219
+ # The last dataset of the stack is overwritten.
220
+ def merge_datasets_into_last(datasets, columns = [0], precision = nil)
195
221
  ds = @stack.pop
196
222
  raise "Nothing on the stack" unless ds
197
- datasets = @stack[-1..-(n-1)]
198
223
  ds.merge_datasets_in(datasets, columns, precision)
199
224
  @stack.push(ds)
200
225
  end
@@ -204,6 +229,32 @@ module CTioga2
204
229
  return @stack.last
205
230
  end
206
231
 
232
+ # Displays the contents of the stack
233
+ def show
234
+ STDERR.puts "Stack contents"
235
+ i = 0
236
+ # Swap the named dataset stuff
237
+ ## @todo Maybe a hash pair should be maintained in permanence ?
238
+ rev = {}
239
+ for k,v in @named_datasets
240
+ rev[v] = k
241
+ end
242
+
243
+ for ds in @stack
244
+ name = rev[ds]
245
+ if name
246
+ name = "(named: '#{name}')"
247
+ else
248
+ name = ""
249
+ end
250
+
251
+ pref = sprintf("#%-2d %-3d:", i, - @stack.size + i)
252
+
253
+ STDERR.puts " * #{pref} #{ds.name} -- #{ds.ys.size + 1} columns #{name}"
254
+ i += 1
255
+ end
256
+ end
257
+
207
258
 
208
259
  end
209
260
 
@@ -284,31 +335,82 @@ onto the stack, or the given stored dataset if the which option is given.
284
335
  EOH
285
336
 
286
337
  ConcatLastCommand =
287
- Cmd.new("join-datasets", nil, "--join-datasets",
288
- [], {'number' => CmdArg.new('integer')}) do |plotmaker, opts|
289
- nb = opts['number'] || 2
290
- plotmaker.data_stack.concatenate_datasets(nb)
338
+ Cmd.new("join-datasets", "-j", "--join-datasets",
339
+ [],
340
+ {
341
+ 'number' => CmdArg.new('integer'),
342
+ 'which' => CmdArg.new('stored-dataset'),
343
+ 'name' => CmdArg.new('text')
344
+ }) do |plotmaker, opts|
345
+ stack = plotmaker.data_stack
346
+ datasets = stack.latest_datasets(opts)
347
+ stack.concatenate_datasets(datasets, opts['name'])
291
348
  end
292
349
 
293
350
  ConcatLastCommand.describe("Concatenates the last datasets on the stack",
294
351
  <<EOH, DataStackGroup)
295
352
  Pops the last two (or number, if it is specified) datasets from the
296
353
  stack, concatenates them (older last) and push them back onto the
297
- stack.
354
+ stack. The name option can be used to give a name to the new dataset.
298
355
  EOH
299
356
 
357
+ ApplyLastCommand =
358
+ Cmd.new("apply-formula", '', "--apply-formula",
359
+ [CmdArg.new('text')],
360
+ {
361
+ 'which' => CmdArg.new('stored-dataset'),
362
+ 'name' => CmdArg.new('text'),
363
+ }) do |plotmaker, formula, opts|
364
+ ds = plotmaker.data_stack.specified_dataset(opts)
365
+ newds = ds.apply_formulas(formula)
366
+ plotmaker.data_stack.add_datasets([newds], opts)
367
+ end
368
+
369
+ ApplyLastCommand.describe("Applies a formula to the last dataset",
370
+ <<EOH, DataStackGroup)
371
+ Applies a formula to the last dataset (or the named one)
372
+ EOH
300
373
 
374
+ ShowStackCommand =
375
+ Cmd.new("show-stack", nil, "--show-stack",
376
+ [],
377
+ { }
378
+ ) do |plotmaker, opts|
379
+ plotmaker.data_stack.show
380
+ end
381
+
382
+ ShowStackCommand.describe("Displays the content of the stack",
383
+ <<EOH, DataStackGroup)
384
+ Displays the current contents of the dataset stack.
385
+
386
+ Mostly used for debugging when operations like {cmd: merge-datasets}
387
+ or {cmd: join-datasets} don't work as expected.
388
+ EOH
389
+
390
+
391
+ ## @todo Add column selection ?
301
392
  MergeToLastCommand =
302
393
  Cmd.new("merge-datasets", nil, "--merge-datasets",
303
- [], {'number' => CmdArg.new('integer')}) do |plotmaker, opts|
304
- nb = opts['number'] || 2
305
- ## @todo all
306
- plotmaker.data_stack.merge_datasets(nb)
394
+ [],
395
+ {
396
+ 'number' => CmdArg.new('integer'),
397
+ 'which' => CmdArg.new('stored-dataset')
398
+ }
399
+ ) do |plotmaker, opts|
400
+ stack = plotmaker.data_stack
401
+ datasets = stack.latest_datasets(opts)
402
+ plotmaker.data_stack.merge_datasets_into_last(datasets)
307
403
  end
308
404
 
309
- MergeToLastCommand.describe("....",
310
- <<EOH, DataStackGroup)
311
- ....
405
+ MergeToLastCommand.describe("Merge datasets based on X column",
406
+ <<EOH, DataStackGroup)
407
+ This commands merges data with matching X values from a dataset (by
408
+ default the one before the last) into the last one. Data points that
409
+ have no corresponding X value in the current dataset are simply
410
+ ignored.
411
+
412
+ This can be used to build 3D datasets for {cmd: xyz-map} or
413
+ {cmd: xy-parametric}.
312
414
  EOH
313
415
 
314
416
  XYReglinCommand =
@@ -325,7 +427,31 @@ EOH
325
427
 
326
428
  XYReglinCommand.describe("....",
327
429
  <<EOH, DataStackGroup)
328
- ....
430
+ ...
431
+
432
+ This command will get documented some day.
433
+ EOH
434
+
435
+
436
+ ComputeContourCommand =
437
+ Cmd.new("compute-contour", nil, "--compute-contour",
438
+ [CmdArg.new("float")], {
439
+ 'which' => CmdArg.new('stored-dataset')
440
+ }) do |plotmaker, level, opts|
441
+ stack = plotmaker.data_stack
442
+ ds = stack.specified_dataset(opts)
443
+ f = ds.make_contour(level)
444
+ newds = Dataset.new("Contour #{level}", [f.x, f.y])
445
+ stack.store_dataset(newds, true)
446
+ end
447
+
448
+ ComputeContourCommand.describe("computes the contour and push it to data stack",
449
+ <<EOH, DataStackGroup)
450
+ Computes the contour at the given level for the given dataset (or the
451
+ last on the stack if none is specified) and pushes it onto the data
452
+ stack.
453
+
454
+ You can further manipulate it as usual.
329
455
  EOH
330
456
 
331
457
  SetDatasetHookCommand =
@@ -0,0 +1,7 @@
1
+ # Automatically generated file.
2
+ module CTioga2
3
+
4
+
5
+ Version::register_svn_info('$Revision: 312$',
6
+ '$Date: Mon Apr 16 21:55:21 2012 +0000$')
7
+ end
@@ -17,7 +17,7 @@ require 'ctioga2/log'
17
17
 
18
18
  module CTioga2
19
19
 
20
- Version::register_svn_info('$Revision: 177 $', '$Date: 2010-10-25 13:22:39 +0200 (Mon, 25 Oct 2010) $')
20
+ Version::register_svn_info('$Revision$', '$Date$')
21
21
 
22
22
  module Graphics
23
23
 
@@ -29,7 +29,7 @@ require 'ctioga2/graphics/elements/contour'
29
29
 
30
30
  module CTioga2
31
31
 
32
- Version::register_svn_info('$Revision: 288 $', '$Date: 2011-02-22 21:12:58 +0100 (Tue, 22 Feb 2011) $')
32
+ Version::register_svn_info('$Revision$', '$Date$')
33
33
 
34
34
  module Graphics
35
35
 
@@ -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
  module Graphics
23
23
 
@@ -1,5 +1,5 @@
1
1
  # contour.rb: contouring code for XYZ data
2
- # copyright (c) 2009 by Vincent Fourmond
2
+ # copyright (c) 2010, 2011 by Vincent Fourmond
3
3
 
4
4
  # This program is free software; you can redistribute it and/or modify
5
5
  # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ require 'ctioga2/graphics/elements/primitive'
17
17
  # This module contains all the classes used by ctioga
18
18
  module CTioga2
19
19
 
20
- Version::register_svn_info('$Revision: 192 $', '$Date: 2010-11-07 18:07:01 +0100 (Sun, 07 Nov 2010) $')
20
+ Version::register_svn_info('$Revision$', '$Date$')
21
21
 
22
22
  module Graphics
23
23
 
@@ -36,6 +36,9 @@ module CTioga2
36
36
  # $last_curve_style calls for a context for the primitive, ie
37
37
  # which was the state of the dataset/curve stack at the moment
38
38
  # when the primitive was drawn ?
39
+ #
40
+ # Worse, I already designed something better. I'll need to get
41
+ # that straight some day.
39
42
  TiogaPrimitiveCall.
40
43
  primitive("contour", "contour", [ 'level'],
41
44
  ContoursOptions) do |t, level,options|