ctioga2 0.7 → 0.8
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 +8 -0
- data/lib/ctioga2/commands/arguments.rb +0 -2
- data/lib/ctioga2/commands/commands.rb +0 -2
- data/lib/ctioga2/commands/context.rb +0 -2
- data/lib/ctioga2/commands/doc/doc.rb +0 -2
- data/lib/ctioga2/commands/doc/documentation-commands.rb +0 -2
- data/lib/ctioga2/commands/doc/help.rb +0 -2
- data/lib/ctioga2/commands/doc/html.rb +0 -2
- data/lib/ctioga2/commands/doc/introspection.rb +0 -2
- data/lib/ctioga2/commands/doc/man.rb +0 -2
- data/lib/ctioga2/commands/doc/markup.rb +0 -2
- data/lib/ctioga2/commands/doc/wordwrap.rb +0 -2
- data/lib/ctioga2/commands/general-commands.rb +0 -2
- data/lib/ctioga2/commands/general-types.rb +0 -2
- data/lib/ctioga2/commands/groups.rb +0 -2
- data/lib/ctioga2/commands/interpreter.rb +0 -2
- data/lib/ctioga2/commands/parsers/command-line.rb +0 -2
- data/lib/ctioga2/commands/parsers/file.rb +0 -2
- data/lib/ctioga2/commands/parsers/old-file.rb +0 -2
- data/lib/ctioga2/commands/strings.rb +0 -2
- data/lib/ctioga2/commands/type.rb +0 -2
- data/lib/ctioga2/commands/variables.rb +0 -2
- data/lib/ctioga2/data/backends/backend.rb +0 -3
- data/lib/ctioga2/data/backends/backends/direct.rb +0 -3
- data/lib/ctioga2/data/backends/backends/gnuplot.rb +0 -3
- data/lib/ctioga2/data/backends/backends/math.rb +0 -2
- data/lib/ctioga2/data/backends/backends/text.rb +0 -3
- data/lib/ctioga2/data/backends/description.rb +0 -3
- data/lib/ctioga2/data/backends/factory.rb +18 -2
- data/lib/ctioga2/data/backends/parameter.rb +0 -2
- data/lib/ctioga2/data/datacolumn.rb +0 -2
- data/lib/ctioga2/data/dataset.rb +5 -3
- data/lib/ctioga2/data/filters.rb +0 -3
- data/lib/ctioga2/data/indexed-dtable.rb +0 -3
- data/lib/ctioga2/data/point.rb +0 -3
- data/lib/ctioga2/data/stack.rb +2 -4
- data/lib/ctioga2/graphics/coordinates.rb +0 -2
- data/lib/ctioga2/graphics/elements.rb +1 -2
- data/lib/ctioga2/graphics/elements/containers.rb +32 -2
- data/lib/ctioga2/graphics/elements/contour.rb +0 -2
- data/lib/ctioga2/graphics/elements/curve2d.rb +0 -2
- data/lib/ctioga2/graphics/elements/element.rb +4 -2
- data/lib/ctioga2/graphics/elements/gradient-region.rb +0 -2
- data/lib/ctioga2/graphics/elements/histogram.rb +298 -0
- data/lib/ctioga2/graphics/elements/parametric2d.rb +7 -3
- data/lib/ctioga2/graphics/elements/primitive.rb +0 -2
- data/lib/ctioga2/graphics/elements/redirecting-container.rb +21 -2
- data/lib/ctioga2/graphics/elements/region.rb +0 -2
- data/lib/ctioga2/graphics/elements/subplot.rb +0 -2
- data/lib/ctioga2/graphics/elements/tangent.rb +0 -2
- data/lib/ctioga2/graphics/elements/xyz-contour.rb +0 -2
- data/lib/ctioga2/graphics/elements/xyz-map.rb +0 -2
- data/lib/ctioga2/graphics/generator.rb +47 -42
- data/lib/ctioga2/graphics/legends.rb +0 -2
- data/lib/ctioga2/graphics/legends/area.rb +0 -2
- data/lib/ctioga2/graphics/legends/items.rb +0 -2
- data/lib/ctioga2/graphics/legends/multicols.rb +0 -2
- data/lib/ctioga2/graphics/legends/provider.rb +0 -2
- data/lib/ctioga2/graphics/legends/storage.rb +0 -2
- data/lib/ctioga2/graphics/root.rb +0 -2
- data/lib/ctioga2/graphics/styles/arrows.rb +0 -2
- data/lib/ctioga2/graphics/styles/axes.rb +0 -2
- data/lib/ctioga2/graphics/styles/background.rb +0 -2
- data/lib/ctioga2/graphics/styles/base.rb +4 -2
- data/lib/ctioga2/graphics/styles/box.rb +0 -2
- data/lib/ctioga2/graphics/styles/carrays.rb +0 -2
- data/lib/ctioga2/graphics/styles/colormap.rb +0 -2
- data/lib/ctioga2/graphics/styles/contour.rb +0 -2
- data/lib/ctioga2/graphics/styles/curve.rb +0 -2
- data/lib/ctioga2/graphics/styles/drawable.rb +0 -2
- data/lib/ctioga2/graphics/styles/errorbar.rb +0 -2
- data/lib/ctioga2/graphics/styles/factory.rb +0 -2
- data/lib/ctioga2/graphics/styles/gradients.rb +0 -2
- data/lib/ctioga2/graphics/styles/legend.rb +0 -2
- data/lib/ctioga2/graphics/styles/location.rb +0 -2
- data/lib/ctioga2/graphics/styles/map-axes.rb +0 -2
- data/lib/ctioga2/graphics/styles/plot-types.rb +51 -3
- data/lib/ctioga2/graphics/styles/plot.rb +0 -2
- data/lib/ctioga2/graphics/styles/sets.rb +0 -2
- data/lib/ctioga2/graphics/styles/sheet.rb +0 -2
- data/lib/ctioga2/graphics/styles/texts.rb +0 -2
- data/lib/ctioga2/graphics/styles/ticks.rb +0 -2
- data/lib/ctioga2/graphics/subplot-commands.rb +0 -2
- data/lib/ctioga2/graphics/types.rb +11 -4
- data/lib/ctioga2/graphics/types/bijection.rb +0 -2
- data/lib/ctioga2/graphics/types/boundaries.rb +0 -2
- data/lib/ctioga2/graphics/types/boxes.rb +0 -2
- data/lib/ctioga2/graphics/types/dimensions.rb +0 -2
- data/lib/ctioga2/graphics/types/fill.rb +27 -15
- data/lib/ctioga2/graphics/types/grid.rb +0 -2
- data/lib/ctioga2/graphics/types/location.rb +0 -2
- data/lib/ctioga2/graphics/types/point.rb +0 -2
- data/lib/ctioga2/log.rb +0 -2
- data/lib/ctioga2/metabuilder/type.rb +0 -2
- data/lib/ctioga2/metabuilder/types/coordinates.rb +0 -2
- data/lib/ctioga2/metabuilder/types/data.rb +0 -2
- data/lib/ctioga2/metabuilder/types/dates.rb +0 -1
- data/lib/ctioga2/metabuilder/types/generic.rb +0 -3
- data/lib/ctioga2/metabuilder/types/lists.rb +25 -3
- data/lib/ctioga2/metabuilder/types/numbers.rb +0 -2
- data/lib/ctioga2/metabuilder/types/strings.rb +0 -3
- data/lib/ctioga2/metabuilder/types/styles.rb +0 -2
- data/lib/ctioga2/plotmaker.rb +2 -4
- data/lib/ctioga2/postprocess.rb +0 -2
- data/lib/ctioga2/utils.rb +6 -64
- data/lib/ctioga2/version.rb +8 -0
- metadata +6 -4
|
@@ -17,8 +17,6 @@ require 'ctioga2/log'
|
|
|
17
17
|
|
|
18
18
|
module CTioga2
|
|
19
19
|
|
|
20
|
-
Version::register_svn_info('$Revision$', '$Date$')
|
|
21
|
-
|
|
22
20
|
module Graphics
|
|
23
21
|
|
|
24
22
|
module Elements
|
|
@@ -46,6 +44,27 @@ module CTioga2
|
|
|
46
44
|
return parent.legend_area = l
|
|
47
45
|
end
|
|
48
46
|
|
|
47
|
+
undef :gp_cache, :gp_cache=
|
|
48
|
+
|
|
49
|
+
def gp_cache
|
|
50
|
+
return parent.gp_cache
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def gp_cache=(c)
|
|
54
|
+
return parent.gp_cache = c
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def each_item(leaf_only = true, recursive = false, tl = true, &blk)
|
|
58
|
+
if tl
|
|
59
|
+
parent.each_item(leaf_only, recursive, tl, &blk)
|
|
60
|
+
else
|
|
61
|
+
if @elements
|
|
62
|
+
super(leaf_only, recursive, true, &blk)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
|
|
49
68
|
end
|
|
50
69
|
end
|
|
51
70
|
end
|
|
@@ -17,8 +17,6 @@ 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: 171 $', '$Date: 2010-10-22 17:07:52 +0200 (Fri, 22 Oct 2010) $')
|
|
21
|
-
|
|
22
20
|
module Graphics
|
|
23
21
|
|
|
24
22
|
module Elements
|
|
@@ -21,8 +21,6 @@ require 'ctioga2/graphics/styles/plot-types'
|
|
|
21
21
|
|
|
22
22
|
module CTioga2
|
|
23
23
|
|
|
24
|
-
Version::register_svn_info('$Revision: 513 $', '$Date: 2013-09-19 00:43:28 +0200 (Thu, 19 Sep 2013) $')
|
|
25
|
-
|
|
26
24
|
module Graphics
|
|
27
25
|
|
|
28
26
|
|
|
@@ -53,6 +51,11 @@ module CTioga2
|
|
|
53
51
|
# parametric plots.
|
|
54
52
|
attr_accessor :xy_parametric_parameters
|
|
55
53
|
|
|
54
|
+
|
|
55
|
+
# Style of histograms
|
|
56
|
+
attr_accessor :histogram_parameters
|
|
57
|
+
|
|
58
|
+
|
|
56
59
|
# Creates a CurveGenerator object.
|
|
57
60
|
def initialize
|
|
58
61
|
@legend_provider = Legends::LegendProvider.new
|
|
@@ -60,6 +63,7 @@ module CTioga2
|
|
|
60
63
|
@current_curves = :xy_plot
|
|
61
64
|
|
|
62
65
|
@xy_parametric_parameters = Styles::ParametricPlotStyle.new
|
|
66
|
+
@histogram_parameters = Styles::HistogramStyle.new
|
|
63
67
|
end
|
|
64
68
|
|
|
65
69
|
PlotOptions = {
|
|
@@ -87,8 +91,16 @@ module CTioga2
|
|
|
87
91
|
CurveStyleFactory::PlotCommandOptions.key?(k)
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
begin
|
|
95
|
+
legend = @legend_provider.dataset_legend(dataset)
|
|
96
|
+
style = @style_factory.next(options)
|
|
97
|
+
style.legend ||= legend # The legend specified as option to
|
|
98
|
+
# the --plot command has precedence
|
|
99
|
+
# over the one specified by
|
|
100
|
+
# --legend.
|
|
101
|
+
curve = send(@current_curves, dataset, style)
|
|
102
|
+
curve.curve_style.target = curve
|
|
103
|
+
end
|
|
92
104
|
return curve
|
|
93
105
|
end
|
|
94
106
|
|
|
@@ -96,56 +108,36 @@ module CTioga2
|
|
|
96
108
|
|
|
97
109
|
## \name Available kinds of curves
|
|
98
110
|
##
|
|
99
|
-
## @
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
# @{
|
|
103
|
-
#
|
|
111
|
+
## @{
|
|
112
|
+
|
|
113
|
+
|
|
104
114
|
# The "classical" 2D plots.
|
|
105
|
-
def xy_plot(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
def xy_plot(dataset, style)
|
|
116
|
+
return Graphics::Elements::Curve2D.new(dataset, style)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# The "classical" 2D plots.
|
|
120
|
+
def histogram(dataset, style)
|
|
121
|
+
return Graphics::Elements::Histogram.new(dataset, style,
|
|
122
|
+
@histogram_parameters.dup)
|
|
113
123
|
end
|
|
114
124
|
|
|
115
125
|
# XYZ plots formerly known as "parametric plots"
|
|
116
|
-
def xy_parametric(
|
|
117
|
-
|
|
118
|
-
style = @style_factory.next(options)
|
|
119
|
-
style.legend ||= legend # The legend specified as option to
|
|
120
|
-
# the --plot command has precedence
|
|
121
|
-
# over the one specified by --legend.
|
|
122
|
-
curve = Graphics::Elements::Parametric2D.
|
|
126
|
+
def xy_parametric(dataset, style)
|
|
127
|
+
return Graphics::Elements::Parametric2D.
|
|
123
128
|
new(dataset, style, @xy_parametric_parameters.dup)
|
|
124
|
-
return curve
|
|
125
129
|
end
|
|
126
130
|
|
|
127
131
|
# XYZ maps
|
|
128
|
-
def xyz_map(
|
|
129
|
-
legend = @legend_provider.dataset_legend(dataset)
|
|
130
|
-
style = @style_factory.next(options)
|
|
131
|
-
style.legend ||= legend # The legend specified as option to
|
|
132
|
-
# the --plot command has precedence
|
|
133
|
-
# over the one specified by --legend.
|
|
132
|
+
def xyz_map(dataset, style)
|
|
134
133
|
style.legend = false # No legend for XYZ maps
|
|
135
|
-
|
|
136
|
-
return curve
|
|
134
|
+
return Graphics::Elements::XYZMap.new(dataset, style)
|
|
137
135
|
end
|
|
138
136
|
|
|
139
137
|
# XYZ maps
|
|
140
|
-
def xyz_contour(
|
|
141
|
-
legend =
|
|
142
|
-
|
|
143
|
-
style.legend ||= legend # The legend specified as option to
|
|
144
|
-
# the --plot command has precedence
|
|
145
|
-
# over the one specified by --legend.
|
|
146
|
-
style.legend = false # No legend for XYZ maps
|
|
147
|
-
curve = Graphics::Elements::XYZContour.new(dataset, style)
|
|
148
|
-
return curve
|
|
138
|
+
def xyz_contour(dataset, style)
|
|
139
|
+
style.legend = false # No legend for XYZ contours
|
|
140
|
+
return Graphics::Elements::XYZContour.new(dataset, style)
|
|
149
141
|
end
|
|
150
142
|
|
|
151
143
|
|
|
@@ -174,6 +166,19 @@ module CTioga2
|
|
|
174
166
|
Switch to XY parametric plots, that is standard XY plots whose appearance
|
|
175
167
|
(such as color, marker color, and, potentially, marker kinds and more)
|
|
176
168
|
are governed by one (or more ?) Z values.
|
|
169
|
+
EOH
|
|
170
|
+
|
|
171
|
+
HistogramPlotCommand =
|
|
172
|
+
Cmd.new("histogram",nil,"--histogram",
|
|
173
|
+
[], Styles::HistogramStyle.options_hash) do |plotmaker, opts|
|
|
174
|
+
plotmaker.curve_generator.current_curves = :histogram
|
|
175
|
+
plotmaker.curve_generator.
|
|
176
|
+
histogram_parameters.set_from_hash(opts)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
HistogramPlotCommand.describe('select histogram plots',
|
|
180
|
+
<<EOH, PlotTypesGroup)
|
|
181
|
+
Switch to drawing histograms.
|
|
177
182
|
EOH
|
|
178
183
|
|
|
179
184
|
ContourPlotCommand =
|
|
@@ -16,8 +16,6 @@ require 'ctioga2/log'
|
|
|
16
16
|
# This module contains all the classes used by ctioga
|
|
17
17
|
module CTioga2
|
|
18
18
|
|
|
19
|
-
Version::register_svn_info('$Revision: 433 $', '$Date: 2013-08-26 22:03:14 +0200 (Mon, 26 Aug 2013) $')
|
|
20
|
-
|
|
21
19
|
module Graphics
|
|
22
20
|
|
|
23
21
|
# All the styles
|
|
@@ -40,6 +38,10 @@ module CTioga2
|
|
|
40
38
|
# names of the attributes, while still showing them up
|
|
41
39
|
# properly documented in rdoc.
|
|
42
40
|
def self.attr_accessor(symbol)
|
|
41
|
+
cal = caller
|
|
42
|
+
# if ! (caller[0] =~ /typed_attribute/)
|
|
43
|
+
# puts "Deprecated use at #{caller[0]}"
|
|
44
|
+
# end
|
|
43
45
|
@attributes ||= []
|
|
44
46
|
@attributes << symbol
|
|
45
47
|
OldAttrAccessor.call(symbol)
|
|
@@ -19,8 +19,6 @@ require 'ctioga2/graphics/coordinates'
|
|
|
19
19
|
# This module contains all the classes used by ctioga
|
|
20
20
|
module CTioga2
|
|
21
21
|
|
|
22
|
-
Version::register_svn_info('$Revision: 335 $', '$Date: 2012-12-23 00:29:44 +0100 (Sun, 23 Dec 2012) $')
|
|
23
|
-
|
|
24
22
|
module Graphics
|
|
25
23
|
|
|
26
24
|
module Styles
|