ctioga 1.11.1
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +340 -0
- data/ctioga/bin/ctable +28 -0
- data/ctioga/bin/ctioga +37 -0
- data/ctioga/doc/ctable.1 +156 -0
- data/ctioga/doc/ctioga.1 +2363 -0
- data/ctioga/examples/README +46 -0
- data/ctioga/examples/ctioga.gnuplot +4 -0
- data/ctioga/examples/ctioga_within_tioga.rb +53 -0
- data/ctioga/examples/ctiogarc.rb +24 -0
- data/ctioga/examples/include_1.rb +15 -0
- data/ctioga/examples/noise.dat +100 -0
- data/ctioga/examples/noise.rb +13 -0
- data/ctioga/examples/trig.csv +100 -0
- data/ctioga/examples/trig.dat +100 -0
- data/ctioga/examples/trig.rb +14 -0
- data/ctioga/examples/trigh.dat +100 -0
- data/ctioga/examples/trigh.rb +10 -0
- data/ctioga/examples/tutorial +763 -0
- data/ctioga/examples/tutorial.sh +269 -0
- data/ctioga/tests/README +14 -0
- data/ctioga/tests/axes.sh +40 -0
- data/ctioga/tests/basic.sh +11 -0
- data/ctioga/tests/draw.sh +24 -0
- data/ctioga/tests/histograms.sh +14 -0
- data/ctioga/tests/insets.sh +41 -0
- data/ctioga/tests/layouts.sh +29 -0
- data/ctioga/tests/legends.sh +113 -0
- data/ctioga/tests/styles.sh +43 -0
- data/ctioga/tests/test_style.sh +8 -0
- data/ctioga/tests/tests.sh +24 -0
- data/ctioga/tests/text_backend.sh +83 -0
- data/ctioga/tests/tioga_defaults.rb +18 -0
- data/lib/CTioga/axes.rb +904 -0
- data/lib/CTioga/backends.rb +88 -0
- data/lib/CTioga/boundaries.rb +224 -0
- data/lib/CTioga/ctable.rb +134 -0
- data/lib/CTioga/curve_style.rb +246 -0
- data/lib/CTioga/debug.rb +199 -0
- data/lib/CTioga/dimension.rb +133 -0
- data/lib/CTioga/elements.rb +17 -0
- data/lib/CTioga/elements/base.rb +84 -0
- data/lib/CTioga/elements/containers.rb +578 -0
- data/lib/CTioga/elements/curves.rb +368 -0
- data/lib/CTioga/elements/tioga_primitives.rb +440 -0
- data/lib/CTioga/layout.rb +595 -0
- data/lib/CTioga/legends.rb +29 -0
- data/lib/CTioga/legends/cmdline.rb +187 -0
- data/lib/CTioga/legends/item.rb +164 -0
- data/lib/CTioga/legends/style.rb +257 -0
- data/lib/CTioga/log.rb +73 -0
- data/lib/CTioga/movingarrays.rb +131 -0
- data/lib/CTioga/partition.rb +271 -0
- data/lib/CTioga/plot_style.rb +230 -0
- data/lib/CTioga/plotmaker.rb +1677 -0
- data/lib/CTioga/shortcuts.rb +69 -0
- data/lib/CTioga/structures.rb +82 -0
- data/lib/CTioga/styles.rb +140 -0
- data/lib/CTioga/themes.rb +581 -0
- data/lib/CTioga/themes/classical.rb +82 -0
- data/lib/CTioga/themes/demo.rb +63 -0
- data/lib/CTioga/themes/fits.rb +91 -0
- data/lib/CTioga/themes/mono.rb +33 -0
- data/lib/CTioga/tioga.rb +32 -0
- data/lib/CTioga/utils.rb +173 -0
- data/lib/MetaBuilder/Parameters/dates.rb +38 -0
- data/lib/MetaBuilder/Parameters/lists.rb +132 -0
- data/lib/MetaBuilder/Parameters/numbers.rb +69 -0
- data/lib/MetaBuilder/Parameters/strings.rb +86 -0
- data/lib/MetaBuilder/Parameters/styles.rb +75 -0
- data/lib/MetaBuilder/Qt4/Parameters/dates.rb +51 -0
- data/lib/MetaBuilder/Qt4/Parameters/numbers.rb +65 -0
- data/lib/MetaBuilder/Qt4/Parameters/strings.rb +106 -0
- data/lib/MetaBuilder/Qt4/parameter.rb +172 -0
- data/lib/MetaBuilder/Qt4/parameters.rb +9 -0
- data/lib/MetaBuilder/descriptions.rb +603 -0
- data/lib/MetaBuilder/factory.rb +101 -0
- data/lib/MetaBuilder/group.rb +57 -0
- data/lib/MetaBuilder/metabuilder.rb +10 -0
- data/lib/MetaBuilder/parameter.rb +374 -0
- data/lib/MetaBuilder/parameters.rb +11 -0
- data/lib/MetaBuilder/qt4.rb +8 -0
- data/lib/SciYAG/Backends/backend.rb +379 -0
- data/lib/SciYAG/Backends/binner.rb +168 -0
- data/lib/SciYAG/Backends/cache.rb +102 -0
- data/lib/SciYAG/Backends/dataset.rb +158 -0
- data/lib/SciYAG/Backends/descriptions.rb +469 -0
- data/lib/SciYAG/Backends/filters.rb +25 -0
- data/lib/SciYAG/Backends/filters/average.rb +134 -0
- data/lib/SciYAG/Backends/filters/cumulate.rb +37 -0
- data/lib/SciYAG/Backends/filters/filter.rb +70 -0
- data/lib/SciYAG/Backends/filters/norm.rb +39 -0
- data/lib/SciYAG/Backends/filters/smooth.rb +63 -0
- data/lib/SciYAG/Backends/filters/sort.rb +43 -0
- data/lib/SciYAG/Backends/filters/strip.rb +34 -0
- data/lib/SciYAG/Backends/filters/trim.rb +64 -0
- data/lib/SciYAG/Backends/gnuplot.rb +131 -0
- data/lib/SciYAG/Backends/math.rb +108 -0
- data/lib/SciYAG/Backends/mdb.rb +462 -0
- data/lib/SciYAG/Backends/multitext.rb +96 -0
- data/lib/SciYAG/Backends/source.rb +64 -0
- data/lib/SciYAG/Backends/text.rb +339 -0
- data/lib/SciYAG/backends.rb +16 -0
- metadata +191 -0
@@ -0,0 +1,269 @@
|
|
1
|
+
CTIOGA="--xpdf --clean-all --display-commandline"
|
2
|
+
export CTIOGA
|
3
|
+
|
4
|
+
ctioga --math 'exp(x)'
|
5
|
+
|
6
|
+
ctioga --math 'exp(x)' --title 'My exponential'
|
7
|
+
|
8
|
+
ctioga --math-xrange -5:1 --math 'exp(x)' -t 'My exponential'
|
9
|
+
|
10
|
+
ctioga --xrange -1:1 --math 'sin(10 * x)' \
|
11
|
+
-t 'badly sampled sine'
|
12
|
+
|
13
|
+
ctioga --math-xrange -1:1 --math 'sin(10 * x)' \
|
14
|
+
-t 'well sampled sine'
|
15
|
+
|
16
|
+
ctioga --xrange -3:3 --math-xrange -2:0 --math 'x+1' \
|
17
|
+
--math-xrange 0:2 'exp(x)' \
|
18
|
+
-t 'Strange exponential'
|
19
|
+
|
20
|
+
ctioga --yrange -2:8 --xrange -3:3 \
|
21
|
+
--math-xrange -2:0 --math 'x+1' \
|
22
|
+
--math-xrange 0:2 'exp(x)' \
|
23
|
+
-t 'Strange exponential'
|
24
|
+
|
25
|
+
ctioga --math --math-trange -3.1415:3.1415 \
|
26
|
+
'sin(2*t):cos(3*t)' \
|
27
|
+
-t 'parametric curve'
|
28
|
+
|
29
|
+
ctioga --include include_1.rb --math 'pol(x)' -t 'Polynomial function'
|
30
|
+
|
31
|
+
ctioga trig.dat -t 'data sine'
|
32
|
+
|
33
|
+
ctioga trig.dat trigh.dat -t 'data sine and hyperbolic tangente'
|
34
|
+
|
35
|
+
ctioga trig.dat@1:3 -t 'data cosine'
|
36
|
+
|
37
|
+
ctioga trig.dat@2:3 -t 'Circle'
|
38
|
+
|
39
|
+
ctioga trig.dat @1:3 @2:3 -t 'Some trigonometry'
|
40
|
+
|
41
|
+
ctioga trig.dat trigh.dat @1:3 @2:3 -t 'Mixing 1'
|
42
|
+
|
43
|
+
ctioga trig.dat @1:3 trigh.dat @2:3 -t 'Mixing 2'
|
44
|
+
|
45
|
+
ctioga trig.dat @1:3 @2:3 trigh.dat -t 'Mixing 3'
|
46
|
+
|
47
|
+
ctioga --legend sine trig.dat \
|
48
|
+
-l cosine @1:3 \
|
49
|
+
-l 'beautiful circle' @2:3 \
|
50
|
+
-t 'Some trigonometry'
|
51
|
+
|
52
|
+
ctioga -l '$\sin(x)$' trig.dat \
|
53
|
+
-l '$\cos(x)$' @1:3 \
|
54
|
+
-l '$r = \sqrt{\cos^2(x) + \sin^2(x)} = 1$' @2:3 \
|
55
|
+
-t 'Some trigonometry'
|
56
|
+
|
57
|
+
ctioga -t 'Use of expansion' trig.dat@1:2##3
|
58
|
+
|
59
|
+
ctioga -t 'Math and expansion' --math 'sin(x + 1##4)'
|
60
|
+
|
61
|
+
ctioga -t 'Unsorted' noise.dat
|
62
|
+
|
63
|
+
ctioga -t 'Sorted' --sort noise.dat
|
64
|
+
|
65
|
+
ctioga -t 'Smoothing' --sort --smooth 3 noise.dat
|
66
|
+
|
67
|
+
ctioga -t 'Comparison' --sort -l 'Noise' noise.dat \
|
68
|
+
--smooth 3 -l 'Smoothing' noise.dat
|
69
|
+
|
70
|
+
ctioga -t 'Sorting second' \
|
71
|
+
-l 'Sorting second' --smooth 3 --sort noise.dat \
|
72
|
+
--filter-clear \
|
73
|
+
-l 'Sorting first' --sort --smooth 3 noise.dat
|
74
|
+
|
75
|
+
ctioga -t 'Cumulative distribution' \
|
76
|
+
--math --math-xrange 0:40 --yrange 1:4.5 --ylog \
|
77
|
+
-l 'data' \
|
78
|
+
--histogram --math-sample 21 'x**3-30*x**2+4100' \
|
79
|
+
-l 'fit' \
|
80
|
+
--no-histogram --math-sample 200 'x**3-30*x**2+4100'
|
81
|
+
|
82
|
+
ctioga -t 'Everybody likes to go there' \
|
83
|
+
-l 'Max value' \
|
84
|
+
trig.dat@'$1:[$2,$3].max'
|
85
|
+
|
86
|
+
ctioga -t 'First and third quarter' \
|
87
|
+
-l 'Conditionnal drawing' \
|
88
|
+
trig.dat@'$2:(if $3*$2 > 0 ; $3 else 0.0/0.0 ; end)'
|
89
|
+
|
90
|
+
ctioga -t 'Square root summation' \
|
91
|
+
-N trig.dat@'$1:sqrt($2##4)' \
|
92
|
+
-l 'Sum using Dvectors' \
|
93
|
+
trig.dat@'$1:Dvector[$2,$3,$4].safe_sqrt.sum'
|
94
|
+
|
95
|
+
ctioga --color Violet trig.dat \
|
96
|
+
-c Blue @1:3 \
|
97
|
+
-c Turquoise @2:3 \
|
98
|
+
-c PowderBlue trigh.dat \
|
99
|
+
-t 'Blue tones'
|
100
|
+
|
101
|
+
ctioga --background Ivory trig.dat -l 'Ivory background'
|
102
|
+
|
103
|
+
ctioga --mono trig.dat @1:3 @2:3 -t 'Black trigonometry'
|
104
|
+
|
105
|
+
ctioga --line-style Line_Type_Dot trig.dat \
|
106
|
+
--line-style Line_Type_Dash @2:3 \
|
107
|
+
--line-style Line_Type_Dot_Long_Dash @1:3 \
|
108
|
+
-t 'Some line types'
|
109
|
+
|
110
|
+
ctioga --line-width 0.5 trig.dat @1:3 \
|
111
|
+
--line-width 2 @2:3 \
|
112
|
+
-t 'See the circle ?'
|
113
|
+
|
114
|
+
ctioga -l 'model' --math --xrange -4:4 'sin(x)' \
|
115
|
+
-l 'data' --text --marker Plus --line-width 0 trig.dat \
|
116
|
+
-t 'comparison data/model'
|
117
|
+
|
118
|
+
ctioga --marker Plus --marker-color Blue trig.dat \
|
119
|
+
-t 'Bicolored graph'
|
120
|
+
|
121
|
+
ctioga -l '$x = \cos(t)$' --math 'cos(x)' -x '$t$' -y '$x$' \
|
122
|
+
-t 'Evolution of position $x$ in time'
|
123
|
+
|
124
|
+
ctioga trig.dat @1:3 @2:3 -t 'Gold trigonometry' --golden-ratio
|
125
|
+
|
126
|
+
ctioga trig.dat @1:3 @2:3 \
|
127
|
+
-t 'Silver trigonometry' \
|
128
|
+
--aspect-ratio 2
|
129
|
+
|
130
|
+
ctioga trig.dat @1:3 @2:3 \
|
131
|
+
-t 'Bronze trigonometry' \
|
132
|
+
--aspect-ratio 0.5
|
133
|
+
|
134
|
+
ctioga trig.dat --margin 0.1 \
|
135
|
+
-t '10\% air on both sides'
|
136
|
+
|
137
|
+
ctioga trig.dat --margin 0.1 --xrange -3.14:3.14 \
|
138
|
+
-t '10\% air on vertical side'
|
139
|
+
|
140
|
+
ctioga trig.dat @1:3 @2:3 trigh.dat @1:3 @2:3 \
|
141
|
+
-t 'default color-set'
|
142
|
+
|
143
|
+
ctioga --color-set colorblind \
|
144
|
+
trig.dat @1:3 @2:3 trigh.dat @1:3 @2:3 \
|
145
|
+
-t 'colorblind color-set'
|
146
|
+
|
147
|
+
ctioga --color-set gradient:Blue--Red,6 \
|
148
|
+
trig.dat @1:3 @2:3 trigh.dat @1:3 @2:3 \
|
149
|
+
-t 'Gradient feature with 6 steps'
|
150
|
+
|
151
|
+
ctioga --color-set gradient:Blue--Red,3 \
|
152
|
+
trig.dat @1:3 @2:3 trigh.dat @1:3 @2:3 \
|
153
|
+
-t 'Gradient feature with 3 steps'
|
154
|
+
|
155
|
+
ctioga -m --marker-set default trig.dat @1:3 @2:3 \
|
156
|
+
-t 'Using Markers'
|
157
|
+
|
158
|
+
ctioga --mono --line-style-set standard trig.dat @1:3 @2:3 \
|
159
|
+
-t 'Using line-styles (which is already the default...)'
|
160
|
+
|
161
|
+
ctioga -m --marker-set default \
|
162
|
+
--marker-color-set colorblind \
|
163
|
+
trig.dat @1:3 @2:3 \
|
164
|
+
-t 'Using Markers'
|
165
|
+
|
166
|
+
ctioga --ylog --math 'exp(x)' -t 'Some straight line'
|
167
|
+
|
168
|
+
ctioga --xlog --ylog --math-xrange 0.001:1000 \
|
169
|
+
--math '1/x**2' '1/x**3' -t 'Power laws'
|
170
|
+
|
171
|
+
ctioga --xlog --ylog --math \
|
172
|
+
--math-xrange 0.1:1 -l 'Low masses' '1/x**1.3' \
|
173
|
+
--math-xrange 1:10 -l 'Intermediate masses' '1/x**2.35' \
|
174
|
+
--math-xrange 10:100 -l 'High masses' '1/x**4*10**1.65' \
|
175
|
+
-x '$\log_{10}(M/M_\odot)$' -y '$\log_{10}(dN/dM)$' \
|
176
|
+
-t 'Kroupa IMF' --golden-ratio
|
177
|
+
|
178
|
+
ctioga --xlog --ylog --xrange -2:3 --math \
|
179
|
+
--math-xrange 0.1:1 -l 'Low masses' '1/x**1.3' \
|
180
|
+
--math-xrange 1:10 -l 'Intermediate masses' '1/x**2.35' \
|
181
|
+
--math-xrange 10:100 -l 'High masses' '1/x**4*10**1.65' \
|
182
|
+
-x '$\log_{10}(M/M_\odot)$' -y '$\log_{10}(dN/dM)$' \
|
183
|
+
-t 'Kroupa IMF' --golden-ratio
|
184
|
+
|
185
|
+
ctioga trig.dat @1:4 -t 'Scaling problem'
|
186
|
+
|
187
|
+
ctioga trig.dat --xfact 0.5 --yfact 5 @1:4 -t 'Scaling resolved'
|
188
|
+
|
189
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange 0:9 \
|
190
|
+
-x '$t$' -y '$U_C$' \
|
191
|
+
'exp(-x/2)' --yrange 0:1
|
192
|
+
|
193
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange 0:9 \
|
194
|
+
-x '$t$' -y '$U_C$' \
|
195
|
+
'exp(-x/2)' --yrange 0:1 \
|
196
|
+
--draw "arrow: 6,0.2 6,0.07"
|
197
|
+
|
198
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange 0:9 \
|
199
|
+
-x '$t$' -y '$U_C$' \
|
200
|
+
'exp(-x/2)' --yrange 0:1 \
|
201
|
+
--draw "arrow: 6,0.2 6,0.07 tail_scale=0.1 head_scale=0.5"
|
202
|
+
|
203
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange 0:9 \
|
204
|
+
-x '$t$' -y '$U_C$' \
|
205
|
+
'exp(-x/2)' --yrange 0:1 \
|
206
|
+
--draw "arrow: 6,0.2 6,0.07 tail_scale=0.1 head_scale=0.5" \
|
207
|
+
--draw "text: 6,0.22 '\$95\\%\$ decay'"
|
208
|
+
|
209
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange 0:9 \
|
210
|
+
-x '$t$' -y '$U_C$' \
|
211
|
+
'exp(-x/2)' --yrange 0:1 \
|
212
|
+
--draw "arrow: 6,0.2 6,0.07 tail_scale=0.1 head_scale=0.5" \
|
213
|
+
--draw "text: 6,0.22 '\$95\\%\$ decay'" \
|
214
|
+
--draw "tangent: 0.5 head_scale=0.7"
|
215
|
+
|
216
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange -1:9 \
|
217
|
+
-x '$t$' -y '$U_C$' \
|
218
|
+
'exp(-x/2)' --yrange 0:1 --xrange 0:9 \
|
219
|
+
--draw "arrow: 6,0.2 6,0.07 tail_scale=0.1 head_scale=0.5" \
|
220
|
+
--draw "text: 6,0.22 '\$95\\%\$ decay'" \
|
221
|
+
--draw "tangent: 0.5 head_scale=0.7" \
|
222
|
+
--draw "tangent: 0.1 head_scale=0.1 xextent=2 color=Black"
|
223
|
+
|
224
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange -1:9 \
|
225
|
+
-x '$t$' -y '$U_C$' \
|
226
|
+
'exp(-x/2)' --yrange 0:1 --xrange 0:9 \
|
227
|
+
--draw "arrow: 6,0.2 6,0.07 tail_scale=0.1 head_scale=0.5" \
|
228
|
+
--draw "text: 6,0.22 '\$95\\%\$ decay'" \
|
229
|
+
--draw "tangent: 0.5 head_scale=0.7" \
|
230
|
+
--draw "tangent: 0.1 head_scale=0.1 yextent=-1 color=Black"
|
231
|
+
|
232
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange -1:9 \
|
233
|
+
-x '$t$' -y '$U_C$' \
|
234
|
+
'exp(-x/2)' --yrange 0:1 --xrange 0:9 \
|
235
|
+
--draw "arrow: 6,0.2 6,0.07 tail_scale=0.1 head_scale=0.5" \
|
236
|
+
--draw "text: 6,0.22 '\$95\\%\$ decay'" \
|
237
|
+
--draw "tangent: 0.5 head_scale=0.7" \
|
238
|
+
--draw "tangent: 0.1 head_scale=0.1 yextent=-1 color=Black" \
|
239
|
+
--draw "text: 1.9,0.15 '\$\\tau=RC\$' \
|
240
|
+
angle=-77 scale=2 color=Blue"
|
241
|
+
|
242
|
+
ctioga -t 'RC circuit decay' -N --math --math-xrange -1:9 \
|
243
|
+
-x '$t$' -y '$U_C$' \
|
244
|
+
'exp(-x/2)' --yrange 0:1 --xrange 0:9 \
|
245
|
+
--draw "arrow: 6,0.2 6,0.07 tail_scale=0.1 head_scale=0.5" \
|
246
|
+
--draw "text: 6,0.22 '\$95\\%\$ decay'" \
|
247
|
+
--draw "tangent: 0.5 head_scale=0.7" \
|
248
|
+
--draw "tangent: 0.1 head_scale=0.1 yextent=-1 color=Black" \
|
249
|
+
--draw "text: 1.9,0.15 '\$\\tau=RC\$' \
|
250
|
+
angle=-77 scale=2 color=Blue" \
|
251
|
+
--draw "marker: 1.5,0.05 OtherHand \
|
252
|
+
angle=-45 scale=2 color=Blue"
|
253
|
+
|
254
|
+
ctioga --multitext '[trig.dat@2]:[trigh.dat@2]' \
|
255
|
+
-t "two files in one plot"
|
256
|
+
|
257
|
+
ctioga --multitext '[trig.dat@2]:[trigh.dat@2] + [trig.dat@3]' \
|
258
|
+
-t "Some computation on different files"
|
259
|
+
|
260
|
+
ctioga --multitext '[trig.dat@2]**2:[trigh.dat@2] * [trig.dat@3]'\
|
261
|
+
-t "Some more computation on different files"
|
262
|
+
|
263
|
+
ctioga --text-separator ';' trig.csv -t "CSV trigonometry"
|
264
|
+
|
265
|
+
CTIOGA="--xpdf --clean-all --display-commandline" \
|
266
|
+
export CTIOGA
|
267
|
+
|
268
|
+
ctioga --viewer gv trig.dat
|
269
|
+
|
data/ctioga/tests/README
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
Ctioga has grown well beyond what I initially thought, and rather
|
2
|
+
subtle interactions take place between the different partners. It is
|
3
|
+
therefore necessary to have a certain amount of tests that will tell
|
4
|
+
me that I've made no blunder. These tests can only be visual tests, as
|
5
|
+
there is no automatic way to check that something looks good.
|
6
|
+
|
7
|
+
Additionnally, these tests can be used to
|
8
|
+
* check that Tioga is functioning properly on your system
|
9
|
+
* check that ctioga is installed correctly
|
10
|
+
* and, most importantly, to serve as examples of how to use ctioga.
|
11
|
+
|
12
|
+
All files in this directory can be used and modified at your will, as
|
13
|
+
they are provided as examples.
|
14
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# This file contains some 'visual tests' for ctioga to make sure that when
|
3
|
+
# I add some features to ctioga, I don't break everything existing.
|
4
|
+
# As such, it also stands as a 'feature list' for ctioga.
|
5
|
+
|
6
|
+
# Various axis stuff
|
7
|
+
|
8
|
+
. ./test_style.sh
|
9
|
+
|
10
|
+
ctioga -N -t 'Alternate axis' 'sin(x)' --y2 -y 'New $y$' 'x**2'
|
11
|
+
|
12
|
+
ctioga -N -t "Tilted title" --angle title 15 'sin(x)'
|
13
|
+
|
14
|
+
ctioga -N -t "Small X and Y ticks" --scale xticks 0.6 'sin(x)' \
|
15
|
+
--scale yaxis 0.6
|
16
|
+
|
17
|
+
ctioga -N -t "Tilted Y ticks" --angle yticks 15 'sin(x)'
|
18
|
+
|
19
|
+
|
20
|
+
ctioga -N -t "Vertical and horizontal lines" 'sin(x)' \
|
21
|
+
--lines-color xaxis Pink --lines-color yaxis Orange
|
22
|
+
|
23
|
+
ctioga -N -t "Bottom left" --xaxis bottom --yaxis left 'sin(x)'
|
24
|
+
|
25
|
+
ctioga -N -t "Top right" --xaxis top --yaxis right 'sin(x)'
|
26
|
+
|
27
|
+
ctioga -N -t "Axes styles" --xaxis ticks \
|
28
|
+
--yaxis majornum 'sin(x)'
|
29
|
+
|
30
|
+
ctioga -N -t "Grid and axes" --grid column=2 \
|
31
|
+
--xaxis top --yaxis right 'sin(x)' --next \
|
32
|
+
'cos(x)' --next \
|
33
|
+
--xaxis org --yaxis left 'tan(x)' --next \
|
34
|
+
--yaxis org 'x**3 - 100*x'
|
35
|
+
|
36
|
+
ctioga -N -t "Non-linear axes" --shift title 2 \
|
37
|
+
--xaxis bottom --new-axis EPR top \
|
38
|
+
--axis-function EPR 6000/x 6000/x \
|
39
|
+
--math-xrange 2500:4000 'sin(sqrt(x))'
|
40
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# This file contains some 'visual tests' for ctioga to make sure that when
|
3
|
+
# I add some features to ctioga, I don't break everything existing.
|
4
|
+
# As such, it also stands as a 'feature list' for ctioga.
|
5
|
+
|
6
|
+
. ./test_style.sh
|
7
|
+
|
8
|
+
ctioga -t 'Basic curve' 'sin(x)'
|
9
|
+
|
10
|
+
ctioga -N -t 'Several styles' 'sin(x)' 'cos(x)' 'tan(x)'
|
11
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# This file contains some 'visual tests' for ctioga to make sure that when
|
3
|
+
# I add some features to ctioga, I don't break everything existing.
|
4
|
+
# As such, it also stands as a 'feature list' for ctioga.
|
5
|
+
|
6
|
+
# Test of the basic drawing primitives of ctioga
|
7
|
+
|
8
|
+
. ./test_style.sh
|
9
|
+
|
10
|
+
ctioga -N -t 'Basic curve' 'sin(x)' \
|
11
|
+
--draw "text: 0,0 'A long text'" \
|
12
|
+
--draw "arrow: 0,-1.2 0,1.2" \
|
13
|
+
--draw "text: 0,0.2 'Left-justified' justification=l" \
|
14
|
+
--draw "text: 0,-0.2 'Right-justified' justification=r" \
|
15
|
+
--draw "arrow: -11,0.5 11,0.5" \
|
16
|
+
--draw "text: -9,0.5 'Top' alignment=t" \
|
17
|
+
--draw "text: -6,0.5 'Mid-height' alignment=m" \
|
18
|
+
--draw "text: -1,0.5 'Baseline ppp' alignment=B" \
|
19
|
+
--draw "text: 4,0.5 'Bottom ppp' alignment=b" \
|
20
|
+
--draw "text: 8,0.5 'Default pp'"
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# This file contains some 'visual tests' for ctioga to make sure that when
|
3
|
+
# I add some features to ctioga, I don't break everything existing.
|
4
|
+
# As such, it also stands as a 'feature list' for ctioga.
|
5
|
+
|
6
|
+
# Histograms
|
7
|
+
|
8
|
+
. ./test_style.sh
|
9
|
+
|
10
|
+
ctioga -t 'Fancy Histograms !' -N --theme pastel \
|
11
|
+
--hist y-axis --fill y-axis --fill-transparency 0.4 \
|
12
|
+
--math-xrange -1:1 --math-samples 16 \
|
13
|
+
--hist-left 0.02 --hist-right 0.48 'x**2' \
|
14
|
+
--hist-left 0.52 --hist-right .98 'x**2 + 0.1*rand()'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# This file contains some 'visual tests' for ctioga to make sure that when
|
3
|
+
# I add some features to ctioga, I don't break everything existing.
|
4
|
+
# As such, it also stands as a 'feature list' for ctioga.
|
5
|
+
|
6
|
+
. ./test_style.sh
|
7
|
+
|
8
|
+
|
9
|
+
# A series of tests on insets
|
10
|
+
ctioga -N -t 'Inset (with title)' 'x**2' --inset .5,.5:.4 \
|
11
|
+
-t 'Title inset' 'cos(x)'
|
12
|
+
|
13
|
+
ctioga -N -t 'Inset (new specification)' 'x**2' --inset '0.4,0.4;0.7,0.6' \
|
14
|
+
-t 'Title inset' 'cos(x)'
|
15
|
+
|
16
|
+
ctioga -N -t 'Chained insets, first take' 'x**2' \
|
17
|
+
--inset '0.4,0.4;0.7,0.6' --rescale 0.6 \
|
18
|
+
-t 'Title inset' 'cos(x)' --xaxis bottom --yaxis left \
|
19
|
+
--next-inset '0.4,0.6;0.2,0.7' -x 'Second inset $x$' 'sin(x)'
|
20
|
+
|
21
|
+
ctioga -N --no-axes -t 'Chained insets, second take' \
|
22
|
+
--inset '0.4,0.4;0.7,0.6' --rescale 0.6 \
|
23
|
+
-t 'Title inset' 'cos(x)' --xaxis bottom --yaxis left \
|
24
|
+
--next-inset '0.4,0.8;0.2,0.6' -x 'Second inset $x$' 'sin(x)' \
|
25
|
+
--next-inset '0.2,0.2;0.4,0.4' -x "Nothing interesting" -t 'Third inset' 'x**3'
|
26
|
+
|
27
|
+
ctioga -N --no-axes -t 'Chained subplots' \
|
28
|
+
--subplot '0.4,0.4;0.7,0.6' --padding 0pt --rescale 0.6 \
|
29
|
+
-t 'Title subplot' 'cos(x)' --xaxis bottom --yaxis left \
|
30
|
+
--next-subplot '0.4,0.8;0.2,0.6' -x 'Second subplot $x$' 'sin(x)' \
|
31
|
+
--next-subplot '0.2,0.2;0.4,0.4' -x "Nothing interesting" -t 'Third subplot' 'x**3'
|
32
|
+
|
33
|
+
ctioga -N --no-axes -t 'X geometry-like inset specification' \
|
34
|
+
--inset '0.3x0.3+0.7+0.6' --padding 0pt --rescale 0.6 \
|
35
|
+
-t '0.3x0.3+0.7+0.6' 'cos(x)' \
|
36
|
+
--next-inset '0.3x0.3-0.7-0.6' -t '0.3x0.3-0.7-0.6' 'cos(x)'
|
37
|
+
|
38
|
+
ctioga -N --no-axes -t 'Chained insets with second axes' \
|
39
|
+
--inset '0.3x0.3+0.7+0.6' --padding 0pt --rescale 0.6 \
|
40
|
+
-t '0.3x0.3+0.7+0.6' 'cos(x)' --y2 'x**2' --end \
|
41
|
+
--next-inset '0.3x0.3-0.7-0.6' -t '0.3x0.3-0.7-0.6' 'cos(x)'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# This file contains some 'visual tests' for ctioga to make sure that when
|
3
|
+
# I add some features to ctioga, I don't break everything existing.
|
4
|
+
# As such, it also stands as a 'feature list' for ctioga.
|
5
|
+
|
6
|
+
# Complex layouts
|
7
|
+
|
8
|
+
. ./test_style.sh
|
9
|
+
|
10
|
+
ctioga -N --xpdf --math --grid column=2 'sin(x)' \
|
11
|
+
--next 'sin(x)' --next 'sin(x)' --next 'sin(x)'
|
12
|
+
|
13
|
+
ctioga -N --xpdf --math -t "A nice grid" \
|
14
|
+
--grid column=2 'sin(x)' \
|
15
|
+
--next 'sin(x)' --next 'sin(x)' --next 'sin(x)' \
|
16
|
+
--next 'sin(x)' --next 'sin(x)' --next 'sin(x)'
|
17
|
+
|
18
|
+
# And few nice versions using the automatic --next:
|
19
|
+
ctioga --xpdf --math --grid column=2 'sin(x)' \
|
20
|
+
--auto-next 'cos(x + 1##4)' 'tan(x)'
|
21
|
+
|
22
|
+
ctioga --xpdf --math --grid column=2 'sin(x)' \
|
23
|
+
--auto-next-expanded 'cos(x + 1##4)' 'tan(x)'
|
24
|
+
|
25
|
+
# Columns now:
|
26
|
+
|
27
|
+
ctioga -N --xpdf --math -t "A column plot" \
|
28
|
+
--col 'sin(x)' --next 'sin(x+1)' --next 'sin(x+2)'
|
29
|
+
|