line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package LaTeX::PGF::Diagram2D::Axis; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
27
|
use 5.000000; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
1902
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @ISA = qw(); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new |
15
|
|
|
|
|
|
|
{ |
16
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
17
|
0
|
0
|
|
|
|
|
if($#_ < 0) { |
18
|
0
|
|
|
|
|
|
croak "Usage: LaTeX::PGF::Diagram2D::Axis->new(width,height)"; |
19
|
|
|
|
|
|
|
} else { |
20
|
0
|
|
|
|
|
|
my $class = shift; |
21
|
0
|
|
|
|
|
|
$self = { |
22
|
|
|
|
|
|
|
'min' => 0.0, # Minimum value |
23
|
|
|
|
|
|
|
'max' => 0.0, # Maximum value |
24
|
|
|
|
|
|
|
't' => 0, # Type: 0=linear, 1=logarithmic |
25
|
|
|
|
|
|
|
'ts' => -1.0, # Tic step |
26
|
|
|
|
|
|
|
'gs' => -1.0, # Grid step |
27
|
|
|
|
|
|
|
'bo' => -1.0, # Border |
28
|
|
|
|
|
|
|
'to' => -1.0, # Tic offset |
29
|
|
|
|
|
|
|
'lo' => -1.0, # Label offset |
30
|
|
|
|
|
|
|
'l' => undef, # Label text |
31
|
|
|
|
|
|
|
'u' => undef, # Unit text |
32
|
|
|
|
|
|
|
'dg' => undef, # Diagram |
33
|
|
|
|
|
|
|
'used' => 0, # Flag: used |
34
|
|
|
|
|
|
|
'n' => '', # Name |
35
|
|
|
|
|
|
|
'color' => undef, # Color |
36
|
|
|
|
|
|
|
'omit' => 0, # Number of scale tics to omit for unit |
37
|
|
|
|
|
|
|
}; |
38
|
0
|
|
|
|
|
|
bless($self, $class); |
39
|
|
|
|
|
|
|
} |
40
|
0
|
|
|
|
|
|
return $self; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub set_grid_step |
46
|
|
|
|
|
|
|
{ |
47
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
48
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
49
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_grid_step(value)"; |
50
|
|
|
|
|
|
|
} else { |
51
|
0
|
|
|
|
|
|
$self = shift; $self->{'gs'} = shift; |
|
0
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
} |
53
|
0
|
|
|
|
|
|
return $self; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub set_tic_step |
59
|
|
|
|
|
|
|
{ |
60
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
61
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
62
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_tic_step(value)"; |
63
|
|
|
|
|
|
|
} else { |
64
|
0
|
|
|
|
|
|
$self = shift; $self->{'ts'} = shift; |
|
0
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
} |
66
|
0
|
|
|
|
|
|
return $self; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub set_linear |
72
|
|
|
|
|
|
|
{ |
73
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
74
|
0
|
0
|
|
|
|
|
if($#_ < 2) { |
75
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_linear(min,max)"; |
76
|
|
|
|
|
|
|
} else { |
77
|
0
|
|
|
|
|
|
$self = shift; |
78
|
0
|
|
|
|
|
|
$self->{'min'} = shift; |
79
|
0
|
|
|
|
|
|
$self->{'max'} = shift; |
80
|
0
|
|
|
|
|
|
$self->{'t'} = 0; |
81
|
0
|
0
|
|
|
|
|
if($self->{'max'} <= $self->{'min'}) { |
82
|
0
|
|
|
|
|
|
carp "Warning: Scale maximum should be larger than minimum!"; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
} |
85
|
0
|
|
|
|
|
|
return $self; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub set_logarithmic |
90
|
|
|
|
|
|
|
{ |
91
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
92
|
0
|
0
|
|
|
|
|
if($#_ < 2) { |
93
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_linear(min,max)"; |
94
|
|
|
|
|
|
|
} else { |
95
|
0
|
|
|
|
|
|
$self = shift; |
96
|
0
|
|
|
|
|
|
$self->{'min'} = shift; |
97
|
0
|
|
|
|
|
|
$self->{'max'} = shift; |
98
|
0
|
|
|
|
|
|
$self->{'t'} = 1; |
99
|
0
|
0
|
|
|
|
|
if($self->{'min'} <= 0.0) { |
100
|
0
|
|
|
|
|
|
croak "ERROR: Only positive values allowed for logarithmic scales!"; |
101
|
|
|
|
|
|
|
} |
102
|
0
|
0
|
|
|
|
|
if($self->{'max'} <= 0.0) { |
103
|
0
|
|
|
|
|
|
croak "ERROR: Only positive values allowed for logarithmic scales!"; |
104
|
|
|
|
|
|
|
} |
105
|
0
|
0
|
|
|
|
|
if($self->{'max'} <= $self->{'min'}) { |
106
|
0
|
|
|
|
|
|
carp "Warning: Scale maximum should be larger than minimum!"; |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
} |
109
|
0
|
|
|
|
|
|
return $self; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub set_omit |
114
|
|
|
|
|
|
|
{ |
115
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
116
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
117
|
0
|
|
|
|
|
|
croak "Usage \$axis->set_omit(number)"; |
118
|
|
|
|
|
|
|
} else { |
119
|
0
|
|
|
|
|
|
$self = shift; $self->{'omit'} = shift; |
|
0
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
} |
121
|
0
|
|
|
|
|
|
return $self; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub correct_if_necessary |
127
|
|
|
|
|
|
|
{ |
128
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
129
|
0
|
|
|
|
|
|
my $debug = 0; |
130
|
0
|
0
|
|
|
|
|
if($#_ < 2) { |
131
|
0
|
|
|
|
|
|
croak "Usage: \$axis->correct_if_necessary(diagram,xyflag)"; |
132
|
|
|
|
|
|
|
} else { |
133
|
0
|
|
|
|
|
|
$self = shift; my $dg = shift; my $xyflag = shift; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
134
|
0
|
0
|
|
|
|
|
if($#_ >= 0) { $debug = shift; } |
|
0
|
|
|
|
|
|
|
135
|
0
|
0
|
|
|
|
|
if($self->{'used'}) { |
136
|
0
|
0
|
|
|
|
|
if($self->{'to'} < 0.0) { |
137
|
0
|
0
|
|
|
|
|
if($dg->{'units'} == 1) { |
138
|
0
|
|
|
|
|
|
$self->{'to'} = 0.2 / 2.54; |
139
|
|
|
|
|
|
|
} else { |
140
|
0
|
0
|
|
|
|
|
if($dg->{'units'} == 2) { |
141
|
0
|
|
|
|
|
|
$self->{'to'} = 0.2 * 72.0 / 2.54 |
142
|
|
|
|
|
|
|
} else { |
143
|
0
|
|
|
|
|
|
$self->{'to'} = 0.2; |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
} |
147
|
0
|
0
|
|
|
|
|
if($self->{'lo'} < 0.0) { |
148
|
0
|
0
|
|
|
|
|
if($dg->{'units'} == 1) { |
149
|
0
|
|
|
|
|
|
$self->{'lo'} = $self->{'to'} + 2.0 * $self->{'fs'} / 72.27; |
150
|
|
|
|
|
|
|
} else { |
151
|
0
|
0
|
|
|
|
|
if($dg->{'units'} == 2) { |
152
|
0
|
|
|
|
|
|
$self->{'lo'} = $self->{'to'} |
153
|
|
|
|
|
|
|
+ 2.0 * 72.0 * $self->{'dg'}->{'fs'} / 72.27; |
154
|
|
|
|
|
|
|
} else { |
155
|
0
|
|
|
|
|
|
$self->{'lo'} = $self->{'to'} |
156
|
|
|
|
|
|
|
+ 2.0 * 2.54 * $self->{'dg'}->{'fs'} / 72.27; |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
} |
160
|
0
|
0
|
|
|
|
|
if($self->{'bo'} < 0.0) { |
161
|
0
|
0
|
|
|
|
|
if($dg->{'units'} == 1) { |
162
|
0
|
|
|
|
|
|
$self->{'bo'} = $self->{'to'} + 3.0 * $self->{'fs'} / 72.27; |
163
|
|
|
|
|
|
|
} else { |
164
|
0
|
0
|
|
|
|
|
if($dg->{'units'} == 2) { |
165
|
0
|
|
|
|
|
|
$self->{'bo'} = $self->{'to'} |
166
|
|
|
|
|
|
|
+ 3.0 * 72.0 * $self->{'dg'}->{'fs'} / 72.27; |
167
|
|
|
|
|
|
|
} else { |
168
|
0
|
|
|
|
|
|
$self->{'bo'} = $self->{'to'} |
169
|
|
|
|
|
|
|
+ 3.0 * 2.54 * $self->{'dg'}->{'fs'} / 72.27; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
} else { |
174
|
0
|
0
|
|
|
|
|
if($self->{'bo'} < 0.0) { |
175
|
0
|
0
|
|
|
|
|
if($dg->{'units'} == 1) { |
176
|
0
|
|
|
|
|
|
$self->{'bo'} = 0.5 / 2.54; |
177
|
|
|
|
|
|
|
} else { |
178
|
0
|
0
|
|
|
|
|
if($dg->{'units'} == 2) { |
179
|
0
|
|
|
|
|
|
$self->{'bo'} = 0.5 * 72.0 / 2.54; |
180
|
|
|
|
|
|
|
} else { |
181
|
0
|
|
|
|
|
|
$self->{'bo'} = 0.5; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
} |
187
|
0
|
0
|
|
|
|
|
if($debug) { |
188
|
0
|
|
|
|
|
|
print "DEBUG Axis->correct_if_necessary: " . $self->{'n'} . "\n"; |
189
|
0
|
|
|
|
|
|
print "DEBUG bo = " . $self->{'bo'} . "\n"; |
190
|
0
|
|
|
|
|
|
print "DEBUG to = " . $self->{'to'} . "\n"; |
191
|
0
|
|
|
|
|
|
print "DEBUG lo = " . $self->{'lo'} . "\n"; |
192
|
|
|
|
|
|
|
} |
193
|
0
|
|
|
|
|
|
return $self; |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub value_to_coord |
199
|
|
|
|
|
|
|
{ |
200
|
0
|
|
|
0
|
0
|
|
my $back = undef; |
201
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
202
|
0
|
|
|
|
|
|
croak "Usage: \$axis->value_to_coord(value)"; |
203
|
|
|
|
|
|
|
} else { |
204
|
0
|
|
|
|
|
|
my $self = shift; |
205
|
0
|
|
|
|
|
|
my $value = shift; |
206
|
0
|
|
|
|
|
|
my $xmin; my $xmax; |
207
|
0
|
|
|
|
|
|
my $vmin = $self->{'min'}; my $vmax = $self->{'max'}; |
|
0
|
|
|
|
|
|
|
208
|
0
|
0
|
0
|
|
|
|
if(($self->{'n'} eq 'l') || ($self->{'n'} eq 'r')) { |
209
|
0
|
|
|
|
|
|
$xmin = $self->{'dg'}->{'y3bp'}; |
210
|
0
|
|
|
|
|
|
$xmax = $self->{'dg'}->{'y4bp'}; |
211
|
|
|
|
|
|
|
} else { |
212
|
0
|
|
|
|
|
|
$xmin = $self->{'dg'}->{'x3bp'}; |
213
|
0
|
|
|
|
|
|
$xmax = $self->{'dg'}->{'x4bp'}; |
214
|
|
|
|
|
|
|
} |
215
|
0
|
0
|
|
|
|
|
if($self->{'t'}) { |
216
|
0
|
|
|
|
|
|
$back = $xmin |
217
|
|
|
|
|
|
|
+ ((($xmax - $xmin) * (log($value/$vmin))) / (log($vmax/$vmin))); |
218
|
|
|
|
|
|
|
} else { |
219
|
0
|
|
|
|
|
|
$back = $xmin + ((($xmax - $xmin) * ($value - $vmin)) / ($vmax - $vmin)); |
220
|
|
|
|
|
|
|
} |
221
|
0
|
|
|
|
|
|
$back = $self->{'dg'}->rd($back, 5); |
222
|
|
|
|
|
|
|
} |
223
|
0
|
|
|
|
|
|
return $back; |
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
# dx/dX or dy/dY |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
sub value_to_derivative |
230
|
|
|
|
|
|
|
{ |
231
|
0
|
|
|
0
|
0
|
|
my $back = undef; |
232
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
233
|
0
|
|
|
|
|
|
croak "Usage: \$axis->value_to_derivative(value)"; |
234
|
|
|
|
|
|
|
} else { |
235
|
0
|
|
|
|
|
|
my $self = shift; |
236
|
0
|
|
|
|
|
|
my $value = shift; |
237
|
0
|
|
|
|
|
|
my $xmin; my $xmax; |
238
|
0
|
|
|
|
|
|
my $vmin = $self->{'min'}; my $vmax = $self->{'max'}; |
|
0
|
|
|
|
|
|
|
239
|
0
|
0
|
0
|
|
|
|
if(($self->{'n'} eq 'l') || ($self->{'n'} eq 'r')) { |
240
|
0
|
|
|
|
|
|
$xmin = $self->{'dg'}->{'y3bp'}; |
241
|
0
|
|
|
|
|
|
$xmax = $self->{'dg'}->{'y4bp'}; |
242
|
|
|
|
|
|
|
} else { |
243
|
0
|
|
|
|
|
|
$xmin = $self->{'dg'}->{'x3bp'}; |
244
|
0
|
|
|
|
|
|
$xmax = $self->{'dg'}->{'x4bp'}; |
245
|
|
|
|
|
|
|
} |
246
|
0
|
0
|
|
|
|
|
if($self->{'t'}) { # logarithmic |
247
|
0
|
|
|
|
|
|
$back = ($xmax - $xmin) / ($value * log($vmax/$vmin)); |
248
|
|
|
|
|
|
|
} else { # linear |
249
|
0
|
|
|
|
|
|
$back = (($xmax - $xmin) / ($vmax - $vmin)); |
250
|
|
|
|
|
|
|
} |
251
|
0
|
|
|
|
|
|
$back = $self->{'dg'}->rd($back, 5); |
252
|
|
|
|
|
|
|
} |
253
|
0
|
|
|
|
|
|
return $back; |
254
|
|
|
|
|
|
|
} |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
sub coord_to_value |
259
|
|
|
|
|
|
|
{ |
260
|
0
|
|
|
0
|
0
|
|
my $back = undef; |
261
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
262
|
0
|
|
|
|
|
|
croak "Usage: \$axis->coord_to_value(coord)"; |
263
|
|
|
|
|
|
|
} else { |
264
|
0
|
|
|
|
|
|
my $self = shift; my $coord = shift; |
|
0
|
|
|
|
|
|
|
265
|
0
|
|
|
|
|
|
my $xmin; my $xmax; |
266
|
0
|
|
|
|
|
|
my $vmin = $self->{'min'}; my $vmax = $self->{'max'}; |
|
0
|
|
|
|
|
|
|
267
|
0
|
0
|
0
|
|
|
|
if(($self->{'n'} eq 'l') || ($self->{'n'} eq 'r')) { |
268
|
0
|
|
|
|
|
|
$xmin = $self->{'y3bp'}; $xmax = $self->{'y4bp'}; |
|
0
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
} else { |
270
|
0
|
|
|
|
|
|
$xmin = $self->{'x3bp'}; $xmax = $self->{'x4bp'}; |
|
0
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
} |
272
|
0
|
0
|
|
|
|
|
if($self->{'t'}) { |
273
|
0
|
|
|
|
|
|
$back = $vmin * exp( |
274
|
|
|
|
|
|
|
(log($vmax/$vmin) * ($coord - $xmin)) / ($xmax - $xmin) |
275
|
|
|
|
|
|
|
); |
276
|
|
|
|
|
|
|
} else { |
277
|
0
|
|
|
|
|
|
$back = $vmin + ((($vmax - $vmin) * ($coord - $xmin)) / ($xmax - $xmin)); |
278
|
|
|
|
|
|
|
} |
279
|
|
|
|
|
|
|
} |
280
|
0
|
|
|
|
|
|
return $back; |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
sub set_unit |
286
|
|
|
|
|
|
|
{ |
287
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
288
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
289
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_unit(text)"; |
290
|
|
|
|
|
|
|
} else { |
291
|
0
|
|
|
|
|
|
$self = shift; $self->{'u'} = shift; |
|
0
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
} |
293
|
0
|
|
|
|
|
|
return $self; |
294
|
|
|
|
|
|
|
} |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
sub set_label |
299
|
|
|
|
|
|
|
{ |
300
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
301
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
302
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_label(text)"; |
303
|
|
|
|
|
|
|
} else { |
304
|
0
|
|
|
|
|
|
$self = shift; $self->{'l'} = shift; |
|
0
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
} |
306
|
0
|
|
|
|
|
|
return $self; |
307
|
|
|
|
|
|
|
} |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
sub set_tic_offset |
312
|
|
|
|
|
|
|
{ |
313
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
314
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
315
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_tic_offset(offset)"; |
316
|
|
|
|
|
|
|
} else { |
317
|
0
|
|
|
|
|
|
$self = shift; $self->{'to'} = shift; |
|
0
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
} |
319
|
0
|
|
|
|
|
|
return $self; |
320
|
|
|
|
|
|
|
} |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
sub set_label_offset |
325
|
|
|
|
|
|
|
{ |
326
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
327
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
328
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_tic_offset(offset)"; |
329
|
|
|
|
|
|
|
} else { |
330
|
0
|
|
|
|
|
|
$self = shift; $self->{'lo'} = shift; |
|
0
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
} |
332
|
0
|
|
|
|
|
|
return $self; |
333
|
|
|
|
|
|
|
} |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
sub set_border |
338
|
|
|
|
|
|
|
{ |
339
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
340
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
341
|
0
|
|
|
|
|
|
croak "Usage: \$axis->set_tic_offset(offset)"; |
342
|
|
|
|
|
|
|
} else { |
343
|
0
|
|
|
|
|
|
$self = shift; $self->{'bo'} = shift; |
|
0
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
} |
345
|
0
|
|
|
|
|
|
return $self; |
346
|
|
|
|
|
|
|
} |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
sub set_color |
351
|
|
|
|
|
|
|
{ |
352
|
0
|
|
|
0
|
0
|
|
my $self = undef; |
353
|
0
|
0
|
|
|
|
|
if($#_ < 1) { |
354
|
0
|
|
|
|
|
|
croak "Usage: \$plot->set_color(color)"; |
355
|
|
|
|
|
|
|
} else { |
356
|
0
|
|
|
|
|
|
$self = shift; $self->{'color'} = shift; |
|
0
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
} |
358
|
0
|
|
|
|
|
|
return $self; |
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
1; |
364
|
|
|
|
|
|
|
__END__ |