« lib/App/SeismicUnixGui/sunix/plot/suxwigb.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/plot/ximage.pm »
| 1 | package App::SeismicUnixGui::sunix::plot::xgraph; | ||
| 2 | |||
| 3 | =head1 DOCUMENTATION | ||
| 4 | |||
| 5 | =head2 SYNOPSIS | ||
| 6 | |||
| 7 | PERL PROGRAM NAME: XGRAPH - X GRAPHer | ||
| 8 | AUTHOR: Juan Lorenzo (Perl module only) | ||
| 9 | DATE: | ||
| 10 | DESCRIPTION: | ||
| 11 | Version: | ||
| 12 | |||
| 13 | =head2 USE | ||
| 14 | |||
| 15 | =head3 NOTES | ||
| 16 | |||
| 17 | =head4 Examples | ||
| 18 | |||
| 19 | =head3 SEISMIC UNIX NOTES | ||
| 20 | |||
| 21 | XGRAPH - X GRAPHer | ||
| 22 | Graphs n[i] pairs of (x,y) coordinates, for i = 1 to nplot. | ||
| 23 | |||
| 24 | xgraph n= [optional parameters] <binaryfile | ||
| 25 | |||
| 26 | X Functionality: | ||
| 27 | q or Q key Quit | ||
| 28 | |||
| 29 | Required Parameters: | ||
| 30 | n array containing number of points per plot | ||
| 31 | |||
| 32 | Optional Parameters: | ||
| 33 | nplot=number of n's number of plots | ||
| 34 | d1=0.0,... x sampling intervals (0.0 if x coordinates input) | ||
| 35 | f1=0.0,... first x values (not used if x coordinates input) | ||
| 36 | d2=0.0,... y sampling intervals (0.0 if y coordinates input) | ||
| 37 | f2=0.0,... first y values (not used if y coordinates input) | ||
| 38 | pairs=1,... =1 for data pairs in format 1.a, =0 for format 1.b | ||
| 39 | linewidth=1,1,... line widths in pixels (0 for no lines) | ||
| 40 | linecolor=2,3,... line colors (black=0, white=1, 2,3,4 = RGB, ...) | ||
| 41 | mark=0,1,2,3,... indices of marks used to represent plotted points | ||
| 42 | marksize=0,0,... size of marks in pixels (0 for no marks) | ||
| 43 | x1beg=x1min value at which axis 1 begins | ||
| 44 | x1end=x1max value at which axis 1 ends | ||
| 45 | x2beg=x2min value at which axis 2 begins | ||
| 46 | x2end=x2max value at which axis 2 ends | ||
| 47 | reverse=0 =1 to reverse sequence of plotting curves ", | ||
| 48 | |||
| 49 | Optional resource parameters (defaults taken from resource database): | ||
| 50 | windowtitle= title on window | ||
| 51 | width= width in pixels of window | ||
| 52 | height= height in pixels of window | ||
| 53 | nTic1= number of tics per numbered tic on axis 1 | ||
| 54 | grid1= grid lines on axis 1 - none, dot, dash, or solid | ||
| 55 | label1= label on axis 1 | ||
| 56 | nTic2= number of tics per numbered tic on axis 2 | ||
| 57 | grid2= grid lines on axis 2 - none, dot, dash, or solid | ||
| 58 | label2= label on axis 2 | ||
| 59 | labelFont= font name for axes labels | ||
| 60 | title= title of plot | ||
| 61 | titleFont= font name for title | ||
| 62 | titleColor= color for title | ||
| 63 | axesColor= color for axes | ||
| 64 | gridColor= color for grid lines | ||
| 65 | style= normal (axis 1 horizontal, axis 2 vertical) or | ||
| 66 | seismic (axis 1 vertical, axis 2 horizontal) | ||
| 67 | |||
| 68 | Data formats supported: | ||
| 69 | 1.a. x1,y1,x2,y2,...,xn,yn | ||
| 70 | b. x1,x2,...,xn,y1,y2,...,yn | ||
| 71 | 2. y1,y2,...,yn (must give non-zero d1[]=) | ||
| 72 | 3. x1,x2,...,xn (must give non-zero d2[]=) | ||
| 73 | 4. nil (must give non-zero d1[]= and non-zero d2[]=) | ||
| 74 | The formats may be repeated and mixed in any order, but if | ||
| 75 | formats 2-4 are used, the d1 and d2 arrays must be specified including | ||
| 76 | d1[]=0.0 d2[]=0.0 entries for any internal occurences of format 1. | ||
| 77 | Similarly, the pairs array must contain place-keeping entries for | ||
| 78 | plots of formats 2-4 if they are mixed with both formats 1.a and 1.b. | ||
| 79 | Also, if formats 2-4 are used with non-zero f1[] or f2[] entries, then | ||
| 80 | the corresponding array(s) must be fully specified including f1[]=0.0 | ||
| 81 | and/or f2[]=0.0 entries for any internal occurences of format 1 or | ||
| 82 | formats 2-4 where the zero entries are desired. | ||
| 83 | mark index: | ||
| 84 | 1. asterisk | ||
| 85 | 2. x-cross | ||
| 86 | 3. open triangle | ||
| 87 | 4. open square | ||
| 88 | 5. open circle | ||
| 89 | 6. solid triangle | ||
| 90 | 7. solid square | ||
| 91 | 8. solid circle | ||
| 92 | |||
| 93 | Note: n1 and n2 are acceptable aliases for n and nplot, respectively. | ||
| 94 | |||
| 95 | Example: | ||
| 96 | xgraph n=50,100,20 d1=2.5,1,0.33 <datafile | ||
| 97 | plots three curves with equally spaced x values in one plot frame | ||
| 98 | x1-coordinates are x1(i) = f1+i*d1 for i = 1 to n (f1=0 by default) | ||
| 99 | number of x2's and then x2-coordinates for each curve are read | ||
| 100 | sequentially from datafile. | ||
| 101 | |||
| 102 | =head2 CHANGES and their DATES | ||
| 103 | |||
| 104 | =cut | ||
| 105 | |||
| 106 | use Moose; | ||
| 107 | our $VERSION = '0.0.1'; | ||
| 108 | |||
| 109 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 110 | |||
| 111 | my $get = L_SU_global_constants->new(); | ||
| 112 | |||
| 113 | my $var = $get->var(); | ||
| 114 | my $empty_string = $var->{_empty_string}; | ||
| 115 | |||
| 116 | my $xgraph = { | ||
| 117 | _axesColor => '', | ||
| 118 | _box_X0 => '', | ||
| 119 | _box_Y0 => '', | ||
| 120 | _d1 => '', | ||
| 121 | _d2 => '', | ||
| 122 | _f1 => '', | ||
| 123 | _f2 => '', | ||
| 124 | _grid1 => '', | ||
| 125 | _grid2 => '', | ||
| 126 | _gridColor => '', | ||
| 127 | _height => '', | ||
| 128 | _label1 => '', | ||
| 129 | _label2 => '', | ||
| 130 | _labelFont => '', | ||
| 131 | _linecolor => '', | ||
| 132 | _linewidth => '', | ||
| 133 | _mark => '', | ||
| 134 | _marksize => '', | ||
| 135 | _n => '', | ||
| 136 | _nTic1 => '', | ||
| 137 | _nTic2 => '', | ||
| 138 | _nplot => '', | ||
| 139 | _pairs => '', | ||
| 140 | _reverse => '', | ||
| 141 | _style => '', | ||
| 142 | _title => '', | ||
| 143 | _titleColor => '', | ||
| 144 | _titleFont => '', | ||
| 145 | _width => '', | ||
| 146 | _windowtitle => '', | ||
| 147 | _x1beg => '', | ||
| 148 | _x1end => '', | ||
| 149 | _x2beg => '', | ||
| 150 | _x2end => '', | ||
| 151 | _Step => '', | ||
| 152 | _note => '', | ||
| 153 | }; | ||
| 154 | |||
| 155 | =head2 sub Step | ||
| 156 | |||
| 157 | collects switches and assembles bash instructions | ||
| 158 | by adding the program name | ||
| 159 | |||
| 160 | =cut | ||
| 161 | |||
| 162 | sub Step { | ||
| 163 | |||
| 164 | if ( $xgraph->{_box_X0} ne $empty_string | ||
| 165 | && $xgraph->{_box_Y0} ne $empty_string | ||
| 166 | && $xgraph->{_height} ne $empty_string | ||
| 167 | && $xgraph->{_width} ne $empty_string | ||
| 168 | ) | ||
| 169 | { | ||
| 170 | $xgraph->{_geometry} = | ||
| 171 | '-geometry ' . $xgraph->{_width} . 'x' | ||
| 172 | . $xgraph->{_height} . '+' | ||
| 173 | . $xgraph->{_box_X0} . '+' | ||
| 174 | . $xgraph->{_box_Y0}; | ||
| 175 | |||
| 176 | $xgraph->{_Step} = 'xgraph' . $xgraph->{_Step}.' '.$xgraph->{_geometry} ; | ||
| 177 | } | ||
| 178 | else { | ||
| 179 | # print("xgraph,missing parameters, NADA\n"); | ||
| 180 | $xgraph->{_Step} = 'xgraph' . $xgraph->{_Step}; | ||
| 181 | } | ||
| 182 | |||
| 183 | return ( $xgraph->{_Step} ); | ||
| 184 | |||
| 185 | } | ||
| 186 | |||
| 187 | =head2 sub note | ||
| 188 | |||
| 189 | collects switches and assembles bash instructions | ||
| 190 | by adding the program name | ||
| 191 | |||
| 192 | =cut | ||
| 193 | |||
| 194 | sub note { | ||
| 195 | |||
| 196 | $xgraph->{_note} = 'xgraph' . $xgraph->{_note}; | ||
| 197 | return ( $xgraph->{_note} ); | ||
| 198 | |||
| 199 | } | ||
| 200 | |||
| 201 | =head2 sub clear | ||
| 202 | |||
| 203 | =cut | ||
| 204 | |||
| 205 | sub clear { | ||
| 206 | |||
| 207 | $xgraph->{_axesColor} = ''; | ||
| 208 | $xgraph->{_box_X0} = ''; | ||
| 209 | $xgraph->{_box_Y0} = ''; | ||
| 210 | $xgraph->{_d1} = ''; | ||
| 211 | $xgraph->{_d2} = ''; | ||
| 212 | $xgraph->{_f1} = ''; | ||
| 213 | $xgraph->{_f2} = ''; | ||
| 214 | $xgraph->{_grid1} = ''; | ||
| 215 | $xgraph->{_grid2} = ''; | ||
| 216 | $xgraph->{_gridColor} = ''; | ||
| 217 | $xgraph->{_height} = ''; | ||
| 218 | $xgraph->{_label1} = ''; | ||
| 219 | $xgraph->{_label2} = ''; | ||
| 220 | $xgraph->{_labelFont} = ''; | ||
| 221 | $xgraph->{_linecolor} = ''; | ||
| 222 | $xgraph->{_linewidth} = ''; | ||
| 223 | $xgraph->{_mark} = ''; | ||
| 224 | $xgraph->{_marksize} = ''; | ||
| 225 | $xgraph->{_n} = ''; | ||
| 226 | $xgraph->{_nTic1} = ''; | ||
| 227 | $xgraph->{_nTic2} = ''; | ||
| 228 | $xgraph->{_nplot} = ''; | ||
| 229 | $xgraph->{_pairs} = ''; | ||
| 230 | $xgraph->{_reverse} = ''; | ||
| 231 | $xgraph->{_style} = ''; | ||
| 232 | $xgraph->{_title} = ''; | ||
| 233 | $xgraph->{_titleColor} = ''; | ||
| 234 | $xgraph->{_titleFont} = ''; | ||
| 235 | $xgraph->{_width} = ''; | ||
| 236 | $xgraph->{_windowtitle} = ''; | ||
| 237 | $xgraph->{_x1beg} = ''; | ||
| 238 | $xgraph->{_x1end} = ''; | ||
| 239 | $xgraph->{_x2beg} = ''; | ||
| 240 | $xgraph->{_x2end} = ''; | ||
| 241 | $xgraph->{_Step} = ''; | ||
| 242 | $xgraph->{_note} = ''; | ||
| 243 | } | ||
| 244 | |||
| 245 | =head2 sub axesColor | ||
| 246 | |||
| 247 | |||
| 248 | =cut | ||
| 249 | |||
| 250 | sub axesColor { | ||
| 251 | |||
| 252 | my ( $self, $axesColor ) = @_; | ||
| 253 | if ( $axesColor ne $empty_string ) { | ||
| 254 | |||
| 255 | $xgraph->{_axesColor} = $axesColor; | ||
| 256 | $xgraph->{_note} = | ||
| 257 | $xgraph->{_note} . ' axesColor=' . $xgraph->{_axesColor}; | ||
| 258 | $xgraph->{_Step} = | ||
| 259 | $xgraph->{_Step} . ' axesColor=' . $xgraph->{_axesColor}; | ||
| 260 | |||
| 261 | } | ||
| 262 | else { | ||
| 263 | print("xgraph, axesColor, missing axesColor,\n"); | ||
| 264 | } | ||
| 265 | } | ||
| 266 | |||
| 267 | =head2 sub axes_style | ||
| 268 | |||
| 269 | normal (axis 1 horizontal, axis 2 vertical) or | ||
| 270 | seismic (axis 1 vertical, axis 2 horizontal) | ||
| 271 | |||
| 272 | =cut | ||
| 273 | |||
| 274 | sub axes_style { | ||
| 275 | |||
| 276 | my ( $self, $style ) = @_; | ||
| 277 | if ( $style ne $empty_string ) { | ||
| 278 | |||
| 279 | $xgraph->{_style} = $style; | ||
| 280 | $xgraph->{_note} = $xgraph->{_note} . ' style=' . $xgraph->{_style}; | ||
| 281 | $xgraph->{_Step} = $xgraph->{_Step} . ' style=' . $xgraph->{_style}; | ||
| 282 | |||
| 283 | } | ||
| 284 | else { | ||
| 285 | print("xgraph, axes_style, missing axes_style,\n"); | ||
| 286 | } | ||
| 287 | } | ||
| 288 | |||
| 289 | =head2 sub box_X0 | ||
| 290 | |||
| 291 | number of pixels right from top | ||
| 292 | left corner of screen | ||
| 293 | |||
| 294 | =cut | ||
| 295 | |||
| 296 | sub box_X0 { | ||
| 297 | |||
| 298 | my ( $self, $box_X0 ) = @_; | ||
| 299 | if ( $box_X0 ne $empty_string ) { | ||
| 300 | |||
| 301 | $xgraph->{_box_X0} = $box_X0; | ||
| 302 | $xgraph->{_note} = $xgraph->{_note} . ' box_X0=' . $xgraph->{_box_X0}; | ||
| 303 | |||
| 304 | } | ||
| 305 | else { | ||
| 306 | print("xgraph, box_box_X0, missing box_box_X0,\n"); | ||
| 307 | } | ||
| 308 | } | ||
| 309 | |||
| 310 | =head2 sub box_Y0 | ||
| 311 | |||
| 312 | number of pixels down from top | ||
| 313 | left corner of screen | ||
| 314 | |||
| 315 | =cut | ||
| 316 | |||
| 317 | sub box_Y0 { | ||
| 318 | |||
| 319 | my ( $self, $box_Y0 ) = @_; | ||
| 320 | if ( $box_Y0 ne $empty_string ) { | ||
| 321 | |||
| 322 | $xgraph->{_box_Y0} = $box_Y0; | ||
| 323 | $xgraph->{_note} = $xgraph->{_note} . ' box_Y0=' . $xgraph->{_box_Y0}; | ||
| 324 | |||
| 325 | } | ||
| 326 | else { | ||
| 327 | print("xgraph, box_$box_Y0, missing box_$box_Y0,\n"); | ||
| 328 | } | ||
| 329 | } | ||
| 330 | |||
| 331 | =head2 sub box_height | ||
| 332 | |||
| 333 | height in pixels of window | ||
| 334 | |||
| 335 | =cut | ||
| 336 | |||
| 337 | sub box_height { | ||
| 338 | |||
| 339 | my ( $self, $height ) = @_; | ||
| 340 | if ( $height ne $empty_string ) { | ||
| 341 | |||
| 342 | $xgraph->{_height} = $height; | ||
| 343 | $xgraph->{_note} = $xgraph->{_note} . ' height=' . $xgraph->{_height}; | ||
| 344 | |||
| 345 | } | ||
| 346 | else { | ||
| 347 | print("xgraph, box_height, missing box_height,\n"); | ||
| 348 | } | ||
| 349 | } | ||
| 350 | |||
| 351 | =head2 sub box_width | ||
| 352 | |||
| 353 | |||
| 354 | =cut | ||
| 355 | |||
| 356 | sub box_width { | ||
| 357 | |||
| 358 | my ( $self, $width ) = @_; | ||
| 359 | if ( $width ne $empty_string ) { | ||
| 360 | |||
| 361 | $xgraph->{_width} = $width; | ||
| 362 | $xgraph->{_note} = $xgraph->{_note} . ' width=' . $xgraph->{_width}; | ||
| 363 | |||
| 364 | } | ||
| 365 | else { | ||
| 366 | print("xgraph, box_width, missing box_width,\n"); | ||
| 367 | } | ||
| 368 | } | ||
| 369 | |||
| 370 | =head2 sub d1 | ||
| 371 | |||
| 372 | |||
| 373 | =cut | ||
| 374 | |||
| 375 | sub d1 { | ||
| 376 | |||
| 377 | my ( $self, $d1 ) = @_; | ||
| 378 | if ( $d1 ne $empty_string ) { | ||
| 379 | |||
| 380 | $xgraph->{_d1} = $d1; | ||
| 381 | $xgraph->{_note} = $xgraph->{_note} . ' d1=' . $xgraph->{_d1}; | ||
| 382 | $xgraph->{_Step} = $xgraph->{_Step} . ' d1=' . $xgraph->{_d1}; | ||
| 383 | |||
| 384 | } | ||
| 385 | else { | ||
| 386 | print("xgraph, d1, missing d1,\n"); | ||
| 387 | } | ||
| 388 | } | ||
| 389 | |||
| 390 | =head2 sub d2 | ||
| 391 | |||
| 392 | |||
| 393 | =cut | ||
| 394 | |||
| 395 | sub d2 { | ||
| 396 | |||
| 397 | my ( $self, $d2 ) = @_; | ||
| 398 | if ( $d2 ne $empty_string ) { | ||
| 399 | |||
| 400 | $xgraph->{_d2} = $d2; | ||
| 401 | $xgraph->{_note} = $xgraph->{_note} . ' d2=' . $xgraph->{_d2}; | ||
| 402 | $xgraph->{_Step} = $xgraph->{_Step} . ' d2=' . $xgraph->{_d2}; | ||
| 403 | |||
| 404 | } | ||
| 405 | else { | ||
| 406 | print("xgraph, d2, missing d2,\n"); | ||
| 407 | } | ||
| 408 | } | ||
| 409 | |||
| 410 | |||
| 411 | =head2 sub dt | ||
| 412 | |||
| 413 | |||
| 414 | =cut | ||
| 415 | |||
| 416 | sub dt { | ||
| 417 | |||
| 418 | my ( $self, $d1 ) = @_; | ||
| 419 | if ($d1) { | ||
| 420 | |||
| 421 | $xgraph->{_d1} = $d1; | ||
| 422 | $xgraph->{_note} = $xgraph->{_note} . ' d1=' . $xgraph->{_d1}; | ||
| 423 | $xgraph->{_Step} = $xgraph->{_Step} . ' d1=' . $xgraph->{_d1}; | ||
| 424 | |||
| 425 | } | ||
| 426 | else { | ||
| 427 | print("xgraph, dt, missing dt,\n"); | ||
| 428 | } | ||
| 429 | } | ||
| 430 | |||
| 431 | =head2 sub dx | ||
| 432 | |||
| 433 | =cut | ||
| 434 | |||
| 435 | sub dx { | ||
| 436 | |||
| 437 | my ( $self, $d1 ) = @_; | ||
| 438 | if ( $d1 ne $empty_string ) { | ||
| 439 | |||
| 440 | $xgraph->{_d1} = $d1; | ||
| 441 | $xgraph->{_note} = $xgraph->{_note} . ' d1=' . $xgraph->{_d1}; | ||
| 442 | $xgraph->{_Step} = $xgraph->{_Step} . ' d1=' . $xgraph->{_d1}; | ||
| 443 | |||
| 444 | } | ||
| 445 | else { | ||
| 446 | print("xgraph, dx, missing dx,\n"); | ||
| 447 | } | ||
| 448 | } | ||
| 449 | |||
| 450 | =head2 sub f1 | ||
| 451 | |||
| 452 | |||
| 453 | =cut | ||
| 454 | |||
| 455 | sub f1 { | ||
| 456 | |||
| 457 | my ( $self, $f1 ) = @_; | ||
| 458 | if ( $f1 ne $empty_string ) { | ||
| 459 | |||
| 460 | $xgraph->{_f1} = $f1; | ||
| 461 | $xgraph->{_note} = $xgraph->{_note} . ' f1=' . $xgraph->{_f1}; | ||
| 462 | $xgraph->{_Step} = $xgraph->{_Step} . ' f1=' . $xgraph->{_f1}; | ||
| 463 | |||
| 464 | } | ||
| 465 | else { | ||
| 466 | print("xgraph, f1, missing f1,\n"); | ||
| 467 | } | ||
| 468 | } | ||
| 469 | |||
| 470 | =head2 sub f2 | ||
| 471 | |||
| 472 | |||
| 473 | =cut | ||
| 474 | |||
| 475 | sub f2 { | ||
| 476 | |||
| 477 | my ( $self, $f2 ) = @_; | ||
| 478 | if ( $f2 ne $empty_string ) { | ||
| 479 | |||
| 480 | $xgraph->{_f2} = $f2; | ||
| 481 | $xgraph->{_note} = $xgraph->{_note} . ' f2=' . $xgraph->{_f2}; | ||
| 482 | $xgraph->{_Step} = $xgraph->{_Step} . ' f2=' . $xgraph->{_f2}; | ||
| 483 | |||
| 484 | } | ||
| 485 | else { | ||
| 486 | print("xgraph, f2, missing f2,\n"); | ||
| 487 | } | ||
| 488 | } | ||
| 489 | |||
| 490 | |||
| 491 | =head2 sub first_tick_num_time | ||
| 492 | |||
| 493 | |||
| 494 | =cut | ||
| 495 | |||
| 496 | sub first_tick_num_time { | ||
| 497 | |||
| 498 | my ( $self, $f1 ) = @_; | ||
| 499 | if ( $f1 ne $empty_string ) { | ||
| 500 | |||
| 501 | $xgraph->{_f1} = $f1; | ||
| 502 | $xgraph->{_note} = $xgraph->{_note} . ' f1=' . $xgraph->{_f1}; | ||
| 503 | $xgraph->{_Step} = $xgraph->{_Step} . ' f1=' . $xgraph->{_f1}; | ||
| 504 | |||
| 505 | } | ||
| 506 | else { | ||
| 507 | print("xgraph, first_tick_num_time, missing f1,\n"); | ||
| 508 | } | ||
| 509 | } | ||
| 510 | |||
| 511 | |||
| 512 | |||
| 513 | =head2 sub first_tick_number_x | ||
| 514 | |||
| 515 | |||
| 516 | =cut | ||
| 517 | |||
| 518 | sub first_tick_number_x { | ||
| 519 | |||
| 520 | my ( $self, $f2 ) = @_; | ||
| 521 | if ($f2) { | ||
| 522 | |||
| 523 | $xgraph->{_f2} = $f2; | ||
| 524 | $xgraph->{_note} = $xgraph->{_note} . ' f2=' . $xgraph->{_f2}; | ||
| 525 | $xgraph->{_Step} = $xgraph->{_Step} . ' f2=' . $xgraph->{_f2}; | ||
| 526 | |||
| 527 | } | ||
| 528 | else { | ||
| 529 | print("xgraph, first_tick_number_x, missing f2,\n"); | ||
| 530 | } | ||
| 531 | } | ||
| 532 | |||
| 533 | |||
| 534 | =head2 sub format | ||
| 535 | |||
| 536 | |||
| 537 | =cut | ||
| 538 | |||
| 539 | sub format { | ||
| 540 | |||
| 541 | my ( $self, $pairs ) = @_; | ||
| 542 | if ( $pairs ne $empty_string ) { | ||
| 543 | |||
| 544 | $xgraph->{_pairs} = $pairs; | ||
| 545 | $xgraph->{_note} = $xgraph->{_note} . ' pairs=' . $xgraph->{_pairs}; | ||
| 546 | $xgraph->{_Step} = $xgraph->{_Step} . ' pairs=' . $xgraph->{_pairs}; | ||
| 547 | |||
| 548 | } | ||
| 549 | else { | ||
| 550 | print("xgraph, format, missing format,\n"); | ||
| 551 | } | ||
| 552 | } | ||
| 553 | |||
| 554 | =head2 sub geometry | ||
| 555 | |||
| 556 | low-level layout not commented in | ||
| 557 | seismic unix notes | ||
| 558 | |||
| 559 | =cut | ||
| 560 | |||
| 561 | sub geometry { | ||
| 562 | |||
| 563 | my ( $self, $geometry ) = @_; | ||
| 564 | if ( $geometry ne $empty_string ) { | ||
| 565 | |||
| 566 | $xgraph->{_geometry} = $geometry; | ||
| 567 | $xgraph->{_note} = | ||
| 568 | $xgraph->{_note} . ' -geometry ' . $xgraph->{_geometry}; | ||
| 569 | $xgraph->{_Step} = | ||
| 570 | $xgraph->{_Step} . ' -geometry ' . $xgraph->{_geometry}; | ||
| 571 | |||
| 572 | # print("xgraph, geometry:$geometry\n"); | ||
| 573 | |||
| 574 | } | ||
| 575 | else { | ||
| 576 | print("xgraph, geometry, missing geometry,\n"); | ||
| 577 | } | ||
| 578 | } | ||
| 579 | |||
| 580 | =head2 sub grid1 | ||
| 581 | |||
| 582 | grid lines on axis 1 - none, dot, dash, or solid | ||
| 583 | |||
| 584 | =cut | ||
| 585 | |||
| 586 | sub grid1 { | ||
| 587 | |||
| 588 | my ( $self, $grid1 ) = @_; | ||
| 589 | if ( $grid1 ne $empty_string ) { | ||
| 590 | |||
| 591 | $xgraph->{_grid1} = $grid1; | ||
| 592 | $xgraph->{_note} = $xgraph->{_note} . ' grid1=' . $xgraph->{_grid1}; | ||
| 593 | $xgraph->{_Step} = $xgraph->{_Step} . ' grid1=' . $xgraph->{_grid1}; | ||
| 594 | |||
| 595 | } | ||
| 596 | else { | ||
| 597 | print("xgraph, grid1, missing grid1,\n"); | ||
| 598 | } | ||
| 599 | } | ||
| 600 | |||
| 601 | =head2 sub grid1_type | ||
| 602 | |||
| 603 | grid lines on axis 1 - none, dot, dash, or solid | ||
| 604 | |||
| 605 | =cut | ||
| 606 | |||
| 607 | sub grid1_type { | ||
| 608 | |||
| 609 | my ( $self, $grid1 ) = @_; | ||
| 610 | if ( $grid1 ne $empty_string ) { | ||
| 611 | |||
| 612 | $xgraph->{_grid1} = $grid1; | ||
| 613 | $xgraph->{_note} = $xgraph->{_note} . ' grid1=' . $xgraph->{_grid1}; | ||
| 614 | $xgraph->{_Step} = $xgraph->{_Step} . ' grid1=' . $xgraph->{_grid1}; | ||
| 615 | |||
| 616 | } | ||
| 617 | else { | ||
| 618 | print("xgraph, grid1_type, missing grid1_type,\n"); | ||
| 619 | } | ||
| 620 | } | ||
| 621 | |||
| 622 | =head2 sub grid2 | ||
| 623 | |||
| 624 | grid lines on axis 2 - none, dot, dash, or solid | ||
| 625 | |||
| 626 | =cut | ||
| 627 | |||
| 628 | sub grid2 { | ||
| 629 | |||
| 630 | my ( $self, $grid2 ) = @_; | ||
| 631 | if ( $grid2 ne $empty_string ) { | ||
| 632 | |||
| 633 | $xgraph->{_grid2} = $grid2; | ||
| 634 | $xgraph->{_note} = $xgraph->{_note} . ' grid2=' . $xgraph->{_grid2}; | ||
| 635 | $xgraph->{_Step} = $xgraph->{_Step} . ' grid2=' . $xgraph->{_grid2}; | ||
| 636 | |||
| 637 | } | ||
| 638 | else { | ||
| 639 | print("xgraph, grid2, missing grid2,\n"); | ||
| 640 | } | ||
| 641 | } | ||
| 642 | |||
| 643 | =head2 sub grid2_type | ||
| 644 | |||
| 645 | grid lines on axis 2 - none, dot, dash, or solid | ||
| 646 | |||
| 647 | =cut | ||
| 648 | |||
| 649 | sub grid2_type { | ||
| 650 | |||
| 651 | my ( $self, $grid2 ) = @_; | ||
| 652 | if ( $grid2 ne $empty_string ) { | ||
| 653 | |||
| 654 | $xgraph->{_grid2} = $grid2; | ||
| 655 | $xgraph->{_note} = $xgraph->{_note} . ' grid2=' . $xgraph->{_grid2}; | ||
| 656 | $xgraph->{_Step} = $xgraph->{_Step} . ' grid2=' . $xgraph->{_grid2}; | ||
| 657 | |||
| 658 | } | ||
| 659 | else { | ||
| 660 | print("xgraph, grid2_type, missing grid2_type,\n"); | ||
| 661 | } | ||
| 662 | } | ||
| 663 | |||
| 664 | =head2 sub gridColor | ||
| 665 | |||
| 666 | |||
| 667 | =cut | ||
| 668 | |||
| 669 | sub gridColor { | ||
| 670 | |||
| 671 | my ( $self, $gridColor ) = @_; | ||
| 672 | if ( $gridColor ne $empty_string ) { | ||
| 673 | |||
| 674 | $xgraph->{_gridColor} = $gridColor; | ||
| 675 | $xgraph->{_note} = | ||
| 676 | $xgraph->{_note} . ' gridColor=' . $xgraph->{_gridColor}; | ||
| 677 | $xgraph->{_Step} = | ||
| 678 | $xgraph->{_Step} . ' gridColor=' . $xgraph->{_gridColor}; | ||
| 679 | |||
| 680 | } | ||
| 681 | else { | ||
| 682 | print("xgraph, gridColor, missing gridColor,\n"); | ||
| 683 | } | ||
| 684 | } | ||
| 685 | |||
| 686 | =head2 sub height | ||
| 687 | |||
| 688 | |||
| 689 | =cut | ||
| 690 | |||
| 691 | sub height { | ||
| 692 | |||
| 693 | my ( $self, $height ) = @_; | ||
| 694 | if ( $height ne $empty_string ) { | ||
| 695 | |||
| 696 | $xgraph->{_height} = $height; | ||
| 697 | $xgraph->{_note} = $xgraph->{_note} . ' height=' . $xgraph->{_height}; | ||
| 698 | $xgraph->{_Step} = $xgraph->{_Step} . ' height=' . $xgraph->{_height}; | ||
| 699 | |||
| 700 | } | ||
| 701 | else { | ||
| 702 | print("xgraph, height, missing height,\n"); | ||
| 703 | } | ||
| 704 | } | ||
| 705 | |||
| 706 | =head2 sub label1 | ||
| 707 | |||
| 708 | label on axis 1 | ||
| 709 | |||
| 710 | =cut | ||
| 711 | |||
| 712 | sub label1 { | ||
| 713 | |||
| 714 | my ( $self, $label1 ) = @_; | ||
| 715 | if ( $label1 ne $empty_string ) { | ||
| 716 | |||
| 717 | $xgraph->{_label1} = $label1; | ||
| 718 | $xgraph->{_note} = $xgraph->{_note} . ' label1=' . $xgraph->{_label1}; | ||
| 719 | $xgraph->{_Step} = $xgraph->{_Step} . ' label1=' . $xgraph->{_label1}; | ||
| 720 | |||
| 721 | } | ||
| 722 | else { | ||
| 723 | print("xgraph, label1, missing label1,\n"); | ||
| 724 | } | ||
| 725 | } | ||
| 726 | |||
| 727 | =head2 sub label2 | ||
| 728 | |||
| 729 | label on axis 2 | ||
| 730 | |||
| 731 | =cut | ||
| 732 | |||
| 733 | sub label2 { | ||
| 734 | |||
| 735 | my ( $self, $label2 ) = @_; | ||
| 736 | if ( $label2 ne $empty_string ) { | ||
| 737 | |||
| 738 | $xgraph->{_label2} = $label2; | ||
| 739 | $xgraph->{_note} = $xgraph->{_note} . ' label2=' . $xgraph->{_label2}; | ||
| 740 | $xgraph->{_Step} = $xgraph->{_Step} . ' label2=' . $xgraph->{_label2}; | ||
| 741 | |||
| 742 | } | ||
| 743 | else { | ||
| 744 | print("xgraph, label2, missing label2,\n"); | ||
| 745 | } | ||
| 746 | } | ||
| 747 | |||
| 748 | =head2 sub labelFont | ||
| 749 | |||
| 750 | |||
| 751 | =cut | ||
| 752 | |||
| 753 | sub labelFont { | ||
| 754 | |||
| 755 | my ( $self, $labelFont ) = @_; | ||
| 756 | if ( $labelFont ne $empty_string ) { | ||
| 757 | |||
| 758 | $xgraph->{_labelFont} = $labelFont; | ||
| 759 | $xgraph->{_note} = | ||
| 760 | $xgraph->{_note} . ' labelFont=' . $xgraph->{_labelFont}; | ||
| 761 | $xgraph->{_Step} = | ||
| 762 | $xgraph->{_Step} . ' labelFont=' . $xgraph->{_labelFont}; | ||
| 763 | |||
| 764 | } | ||
| 765 | else { | ||
| 766 | print("xgraph, labelFont, missing labelFont,\n"); | ||
| 767 | } | ||
| 768 | } | ||
| 769 | |||
| 770 | =head2 sub line_color | ||
| 771 | |||
| 772 | |||
| 773 | =cut | ||
| 774 | |||
| 775 | sub line_color { | ||
| 776 | |||
| 777 | my ( $self, $linecolor ) = @_; | ||
| 778 | if ( $linecolor ne $empty_string ) { | ||
| 779 | |||
| 780 | $xgraph->{_linecolor} = $linecolor; | ||
| 781 | $xgraph->{_note} = | ||
| 782 | $xgraph->{_note} . ' linecolor=' . $xgraph->{_linecolor}; | ||
| 783 | $xgraph->{_Step} = | ||
| 784 | $xgraph->{_Step} . ' linecolor=' . $xgraph->{_linecolor}; | ||
| 785 | |||
| 786 | } | ||
| 787 | else { | ||
| 788 | print("xgraph, line_color, missing line_color,\n"); | ||
| 789 | } | ||
| 790 | } | ||
| 791 | |||
| 792 | =head2 sub linecolor | ||
| 793 | |||
| 794 | |||
| 795 | =cut | ||
| 796 | |||
| 797 | sub linecolor { | ||
| 798 | |||
| 799 | my ( $self, $linecolor ) = @_; | ||
| 800 | if ( $linecolor ne $empty_string ) { | ||
| 801 | |||
| 802 | $xgraph->{_linecolor} = $linecolor; | ||
| 803 | $xgraph->{_note} = | ||
| 804 | $xgraph->{_note} . ' linecolor=' . $xgraph->{_linecolor}; | ||
| 805 | $xgraph->{_Step} = | ||
| 806 | $xgraph->{_Step} . ' linecolor=' . $xgraph->{_linecolor}; | ||
| 807 | |||
| 808 | } | ||
| 809 | else { | ||
| 810 | print("xgraph, line_color, missing line_color,\n"); | ||
| 811 | } | ||
| 812 | } | ||
| 813 | |||
| 814 | =head2 sub line_width | ||
| 815 | |||
| 816 | line widths in pixels (0 for no lines) | ||
| 817 | |||
| 818 | =cut | ||
| 819 | |||
| 820 | sub line_width { | ||
| 821 | |||
| 822 | my ( $self, $linewidth ) = @_; | ||
| 823 | if ( $linewidth ne $empty_string ) { | ||
| 824 | |||
| 825 | $xgraph->{_linewidth} = $linewidth; | ||
| 826 | $xgraph->{_note} = | ||
| 827 | $xgraph->{_note} . ' linewidth=' . $xgraph->{_linewidth}; | ||
| 828 | $xgraph->{_Step} = | ||
| 829 | $xgraph->{_Step} . ' linewidth=' . $xgraph->{_linewidth}; | ||
| 830 | |||
| 831 | } | ||
| 832 | else { | ||
| 833 | print("xgraph, line_widths, missing line_widths,\n"); | ||
| 834 | } | ||
| 835 | } | ||
| 836 | |||
| 837 | =head2 sub line_widths | ||
| 838 | |||
| 839 | line widths in pixels (0 for no lines) | ||
| 840 | |||
| 841 | =cut | ||
| 842 | |||
| 843 | sub line_widths { | ||
| 844 | |||
| 845 | my ( $self, $linewidth ) = @_; | ||
| 846 | if ( $linewidth ne $empty_string ) { | ||
| 847 | |||
| 848 | # print("1. xgraph, line_widths, $linewidth\n"); | ||
| 849 | $xgraph->{_linewidth} = $linewidth; | ||
| 850 | $xgraph->{_note} = | ||
| 851 | $xgraph->{_note} . ' linewidth=' . $xgraph->{_linewidth}; | ||
| 852 | $xgraph->{_Step} = | ||
| 853 | $xgraph->{_Step} . ' linewidth=' . $xgraph->{_linewidth}; | ||
| 854 | # print("2. xgraph, line_widths, $linewidth\n"); | ||
| 855 | |||
| 856 | } | ||
| 857 | else { | ||
| 858 | print("xgraph, line_widths, missing line_widths,\n"); | ||
| 859 | } | ||
| 860 | } | ||
| 861 | |||
| 862 | =head2 sub linewidth | ||
| 863 | |||
| 864 | line widths in pixels (0 for no lines | ||
| 865 | |||
| 866 | =cut | ||
| 867 | |||
| 868 | sub linewidth { | ||
| 869 | |||
| 870 | my ( $self, $linewidth ) = @_; | ||
| 871 | if ( $linewidth ne $empty_string ) { | ||
| 872 | |||
| 873 | $xgraph->{_linewidth} = $linewidth; | ||
| 874 | $xgraph->{_note} = | ||
| 875 | $xgraph->{_note} . ' linewidth=' . $xgraph->{_linewidth}; | ||
| 876 | $xgraph->{_Step} = | ||
| 877 | $xgraph->{_Step} . ' linewidth=' . $xgraph->{_linewidth}; | ||
| 878 | |||
| 879 | } | ||
| 880 | else { | ||
| 881 | print("xgraph, linewidth, missing linewidth,\n"); | ||
| 882 | } | ||
| 883 | } | ||
| 884 | |||
| 885 | =head2 sub mark | ||
| 886 | |||
| 887 | |||
| 888 | =cut | ||
| 889 | |||
| 890 | sub mark { | ||
| 891 | |||
| 892 | my ( $self, $mark ) = @_; | ||
| 893 | if ( $mark ne $empty_string ) { | ||
| 894 | |||
| 895 | $xgraph->{_mark} = $mark; | ||
| 896 | $xgraph->{_note} = $xgraph->{_note} . ' mark=' . $xgraph->{_mark}; | ||
| 897 | $xgraph->{_Step} = $xgraph->{_Step} . ' mark=' . $xgraph->{_mark}; | ||
| 898 | |||
| 899 | } | ||
| 900 | else { | ||
| 901 | print("xgraph, mark, missing mark,\n"); | ||
| 902 | } | ||
| 903 | } | ||
| 904 | |||
| 905 | =head2 sub mark_indices | ||
| 906 | |||
| 907 | indices of marks used to represent plotted points | ||
| 908 | |||
| 909 | =cut | ||
| 910 | |||
| 911 | sub mark_indices { | ||
| 912 | |||
| 913 | my ( $self, $mark ) = @_; | ||
| 914 | if ( $mark ne $empty_string ) { | ||
| 915 | |||
| 916 | $xgraph->{_mark} = $mark; | ||
| 917 | $xgraph->{_note} = $xgraph->{_note} . ' mark=' . $xgraph->{_mark}; | ||
| 918 | $xgraph->{_Step} = $xgraph->{_Step} . ' mark=' . $xgraph->{_mark}; | ||
| 919 | |||
| 920 | } | ||
| 921 | else { | ||
| 922 | print("xgraph, mark_indices, missing mark_indices,\n"); | ||
| 923 | } | ||
| 924 | } | ||
| 925 | |||
| 926 | =head2 sub marksize | ||
| 927 | |||
| 928 | |||
| 929 | =cut | ||
| 930 | |||
| 931 | sub marksize { | ||
| 932 | |||
| 933 | my ( $self, $marksize ) = @_; | ||
| 934 | if ( $marksize ne $empty_string ) { | ||
| 935 | |||
| 936 | $xgraph->{_marksize} = $marksize; | ||
| 937 | $xgraph->{_note} = | ||
| 938 | $xgraph->{_note} . ' marksize=' . $xgraph->{_marksize}; | ||
| 939 | $xgraph->{_Step} = | ||
| 940 | $xgraph->{_Step} . ' marksize=' . $xgraph->{_marksize}; | ||
| 941 | |||
| 942 | } | ||
| 943 | else { | ||
| 944 | print("xgraph, marksize, missing marksize,\n"); | ||
| 945 | } | ||
| 946 | } | ||
| 947 | |||
| 948 | =head2 sub mark_size_pix | ||
| 949 | |||
| 950 | size of marks in pixels (0 for no marks) | ||
| 951 | |||
| 952 | =cut | ||
| 953 | |||
| 954 | sub mark_size_pix { | ||
| 955 | |||
| 956 | my ( $self, $marksize ) = @_; | ||
| 957 | if ( $marksize ne $empty_string ) { | ||
| 958 | |||
| 959 | $xgraph->{_marksize} = $marksize; | ||
| 960 | $xgraph->{_note} = | ||
| 961 | $xgraph->{_note} . ' marksize=' . $xgraph->{_marksize}; | ||
| 962 | $xgraph->{_Step} = | ||
| 963 | $xgraph->{_Step} . ' marksize=' . $xgraph->{_marksize}; | ||
| 964 | |||
| 965 | } | ||
| 966 | else { | ||
| 967 | print("xgraph, mark_size_pix, missing mark_size_pix,\n"); | ||
| 968 | } | ||
| 969 | } | ||
| 970 | |||
| 971 | =head2 sub n | ||
| 972 | |||
| 973 | |||
| 974 | =cut | ||
| 975 | |||
| 976 | sub n { | ||
| 977 | |||
| 978 | my ( $self, $n ) = @_; | ||
| 979 | if ( $n ne $empty_string ) { | ||
| 980 | |||
| 981 | $xgraph->{_n} = $n; | ||
| 982 | $xgraph->{_note} = $xgraph->{_note} . ' n=' . $xgraph->{_n}; | ||
| 983 | $xgraph->{_Step} = $xgraph->{_Step} . ' n=' . $xgraph->{_n}; | ||
| 984 | |||
| 985 | } | ||
| 986 | else { | ||
| 987 | print("xgraph, n, missing n,\n"); | ||
| 988 | } | ||
| 989 | } | ||
| 990 | |||
| 991 | =head2 sub num_points | ||
| 992 | |||
| 993 | |||
| 994 | =cut | ||
| 995 | |||
| 996 | sub num_points { | ||
| 997 | |||
| 998 | my ( $self, $n ) = @_; | ||
| 999 | if ( $n ne $empty_string ) { | ||
| 1000 | |||
| 1001 | $xgraph->{_n} = $n; | ||
| 1002 | $xgraph->{_note} = $xgraph->{_note} . ' n=' . $xgraph->{_n}; | ||
| 1003 | $xgraph->{_Step} = $xgraph->{_Step} . ' n=' . $xgraph->{_n}; | ||
| 1004 | |||
| 1005 | } | ||
| 1006 | else { | ||
| 1007 | print("xgraph, num_points, missing num_points,\n"); | ||
| 1008 | } | ||
| 1009 | } | ||
| 1010 | |||
| 1011 | =head2 sub nTic1 | ||
| 1012 | |||
| 1013 | |||
| 1014 | =cut | ||
| 1015 | |||
| 1016 | sub nTic1 { | ||
| 1017 | |||
| 1018 | my ( $self, $nTic1 ) = @_; | ||
| 1019 | if ( $nTic1 ne $empty_string ) { | ||
| 1020 | |||
| 1021 | $xgraph->{_nTic1} = $nTic1; | ||
| 1022 | $xgraph->{_note} = $xgraph->{_note} . ' nTic1=' . $xgraph->{_nTic1}; | ||
| 1023 | $xgraph->{_Step} = $xgraph->{_Step} . ' nTic1=' . $xgraph->{_nTic1}; | ||
| 1024 | |||
| 1025 | } | ||
| 1026 | else { | ||
| 1027 | print("xgraph, nTic1, missing nTic1,\n"); | ||
| 1028 | } | ||
| 1029 | } | ||
| 1030 | |||
| 1031 | =head2 sub nTic2 | ||
| 1032 | |||
| 1033 | |||
| 1034 | =cut | ||
| 1035 | |||
| 1036 | sub nTic2 { | ||
| 1037 | |||
| 1038 | my ( $self, $nTic2 ) = @_; | ||
| 1039 | if ( $nTic2 ne $empty_string ) { | ||
| 1040 | |||
| 1041 | $xgraph->{_nTic2} = $nTic2; | ||
| 1042 | $xgraph->{_note} = $xgraph->{_note} . ' nTic2=' . $xgraph->{_nTic2}; | ||
| 1043 | $xgraph->{_Step} = $xgraph->{_Step} . ' nTic2=' . $xgraph->{_nTic2}; | ||
| 1044 | |||
| 1045 | } | ||
| 1046 | else { | ||
| 1047 | print("xgraph, nTic2, missing nTic2,\n"); | ||
| 1048 | } | ||
| 1049 | } | ||
| 1050 | |||
| 1051 | =head2 sub nplot | ||
| 1052 | |||
| 1053 | |||
| 1054 | =cut | ||
| 1055 | |||
| 1056 | sub nplot { | ||
| 1057 | |||
| 1058 | my ( $self, $nplot ) = @_; | ||
| 1059 | if ( $nplot ne $empty_string ) { | ||
| 1060 | |||
| 1061 | $xgraph->{_nplot} = $nplot; | ||
| 1062 | $xgraph->{_note} = $xgraph->{_note} . ' nplot=' . $xgraph->{_nplot}; | ||
| 1063 | $xgraph->{_Step} = $xgraph->{_Step} . ' nplot=' . $xgraph->{_nplot}; | ||
| 1064 | |||
| 1065 | } | ||
| 1066 | else { | ||
| 1067 | print("xgraph, nplot, missing nplot,\n"); | ||
| 1068 | } | ||
| 1069 | } | ||
| 1070 | |||
| 1071 | =head2 sub num_minor_ticks_betw_distance_ticks | ||
| 1072 | |||
| 1073 | |||
| 1074 | =cut | ||
| 1075 | |||
| 1076 | sub num_minor_ticks_betw_distance_ticks { | ||
| 1077 | |||
| 1078 | my ( $self, $nTic2 ) = @_; | ||
| 1079 | if ($nTic2) { | ||
| 1080 | |||
| 1081 | $xgraph->{_nTic2} = $nTic2; | ||
| 1082 | $xgraph->{_note} = | ||
| 1083 | $xgraph->{_note} . ' nTic2=' . $xgraph->{_nTic2}; | ||
| 1084 | $xgraph->{_Step} = | ||
| 1085 | $xgraph->{_Step} . ' nTic2=' . $xgraph->{_nTic2}; | ||
| 1086 | |||
| 1087 | } | ||
| 1088 | else { | ||
| 1089 | print( | ||
| 1090 | "xgraph, num_minor_ticks_betw_distance_ticks, missing nTic2,\n"); | ||
| 1091 | } | ||
| 1092 | } | ||
| 1093 | |||
| 1094 | =head2 sub num_minor_ticks_betw_time_ticks | ||
| 1095 | |||
| 1096 | |||
| 1097 | =cut | ||
| 1098 | |||
| 1099 | sub num_minor_ticks_betw_time_ticks { | ||
| 1100 | |||
| 1101 | my ( $self, $nTic1 ) = @_; | ||
| 1102 | if ($nTic1) { | ||
| 1103 | |||
| 1104 | $xgraph->{_nTic1} = $nTic1; | ||
| 1105 | $xgraph->{_note} = | ||
| 1106 | $xgraph->{_note} . ' nTic1=' . $xgraph->{_nTic1}; | ||
| 1107 | $xgraph->{_Step} = | ||
| 1108 | $xgraph->{_Step} . ' nTic1=' . $xgraph->{_nTic1}; | ||
| 1109 | |||
| 1110 | } | ||
| 1111 | else { | ||
| 1112 | print("xgraph, num_minor_ticks_betw_time_ticks, missing nTic1,\n"); | ||
| 1113 | } | ||
| 1114 | } | ||
| 1115 | |||
| 1116 | |||
| 1117 | =head2 sub orientation | ||
| 1118 | |||
| 1119 | normal (axis 1 horizontal, axis 2 vertical) or | ||
| 1120 | seismic (axis 1 vertical, axis 2 horizontal) | ||
| 1121 | |||
| 1122 | =cut | ||
| 1123 | |||
| 1124 | sub orientation { | ||
| 1125 | |||
| 1126 | my ( $self, $style ) = @_; | ||
| 1127 | if ( $style ne $empty_string ) { | ||
| 1128 | |||
| 1129 | $xgraph->{_style} = $style; | ||
| 1130 | $xgraph->{_note} = $xgraph->{_note} . ' style=' . $xgraph->{_style}; | ||
| 1131 | $xgraph->{_Step} = $xgraph->{_Step} . ' style=' . $xgraph->{_style}; | ||
| 1132 | |||
| 1133 | } | ||
| 1134 | else { | ||
| 1135 | print("xgraph, orientation, missing orientation,\n"); | ||
| 1136 | } | ||
| 1137 | } | ||
| 1138 | |||
| 1139 | =head2 sub pairs | ||
| 1140 | |||
| 1141 | |||
| 1142 | =cut | ||
| 1143 | |||
| 1144 | sub pairs { | ||
| 1145 | |||
| 1146 | my ( $self, $pairs ) = @_; | ||
| 1147 | if ( $pairs ne $empty_string ) { | ||
| 1148 | |||
| 1149 | $xgraph->{_pairs} = $pairs; | ||
| 1150 | $xgraph->{_note} = $xgraph->{_note} . ' pairs=' . $xgraph->{_pairs}; | ||
| 1151 | $xgraph->{_Step} = $xgraph->{_Step} . ' pairs=' . $xgraph->{_pairs}; | ||
| 1152 | |||
| 1153 | } | ||
| 1154 | else { | ||
| 1155 | print("xgraph, pairs, missing pairs,\n"); | ||
| 1156 | } | ||
| 1157 | } | ||
| 1158 | |||
| 1159 | =head2 sub reverse | ||
| 1160 | |||
| 1161 | |||
| 1162 | =cut | ||
| 1163 | |||
| 1164 | sub reverse { | ||
| 1165 | |||
| 1166 | my ( $self, $reverse ) = @_; | ||
| 1167 | if ( $reverse ne $empty_string ) { | ||
| 1168 | |||
| 1169 | $xgraph->{_reverse} = $reverse; | ||
| 1170 | $xgraph->{_note} = | ||
| 1171 | $xgraph->{_note} . ' reverse=' . $xgraph->{_reverse}; | ||
| 1172 | $xgraph->{_Step} = | ||
| 1173 | $xgraph->{_Step} . ' reverse=' . $xgraph->{_reverse}; | ||
| 1174 | |||
| 1175 | } | ||
| 1176 | else { | ||
| 1177 | print("xgraph, reverse, missing reverse,\n"); | ||
| 1178 | } | ||
| 1179 | } | ||
| 1180 | |||
| 1181 | =head2 sub style | ||
| 1182 | |||
| 1183 | normal (axis 1 horizontal, axis 2 vertical) or | ||
| 1184 | seismic (axis 1 vertical, axis 2 horizontal) | ||
| 1185 | |||
| 1186 | =cut | ||
| 1187 | |||
| 1188 | sub style { | ||
| 1189 | |||
| 1190 | my ( $self, $style ) = @_; | ||
| 1191 | if ( $style ne $empty_string ) { | ||
| 1192 | |||
| 1193 | $xgraph->{_style} = $style; | ||
| 1194 | $xgraph->{_note} = $xgraph->{_note} . ' style=' . $xgraph->{_style}; | ||
| 1195 | $xgraph->{_Step} = $xgraph->{_Step} . ' style=' . $xgraph->{_style}; | ||
| 1196 | |||
| 1197 | } | ||
| 1198 | else { | ||
| 1199 | print("xgraph, style, missing style,\n"); | ||
| 1200 | } | ||
| 1201 | } | ||
| 1202 | |||
| 1203 | =head2 sub title | ||
| 1204 | |||
| 1205 | title for plot | ||
| 1206 | |||
| 1207 | =cut | ||
| 1208 | |||
| 1209 | sub title { | ||
| 1210 | |||
| 1211 | my ( $self, $title ) = @_; | ||
| 1212 | if ( $title ne $empty_string ) { | ||
| 1213 | |||
| 1214 | $xgraph->{_title} = $title; | ||
| 1215 | $xgraph->{_note} = $xgraph->{_note} . ' title=' . $xgraph->{_title}; | ||
| 1216 | $xgraph->{_Step} = $xgraph->{_Step} . ' title=' . $xgraph->{_title}; | ||
| 1217 | |||
| 1218 | } | ||
| 1219 | else { | ||
| 1220 | print("xgraph, title, missing title,\n"); | ||
| 1221 | } | ||
| 1222 | } | ||
| 1223 | |||
| 1224 | =head2 sub titleColor | ||
| 1225 | |||
| 1226 | |||
| 1227 | =cut | ||
| 1228 | |||
| 1229 | sub titleColor { | ||
| 1230 | |||
| 1231 | my ( $self, $titleColor ) = @_; | ||
| 1232 | if ( $titleColor ne $empty_string ) { | ||
| 1233 | |||
| 1234 | $xgraph->{_titleColor} = $titleColor; | ||
| 1235 | $xgraph->{_note} = | ||
| 1236 | $xgraph->{_note} . ' titleColor=' . $xgraph->{_titleColor}; | ||
| 1237 | $xgraph->{_Step} = | ||
| 1238 | $xgraph->{_Step} . ' titleColor=' . $xgraph->{_titleColor}; | ||
| 1239 | |||
| 1240 | } | ||
| 1241 | else { | ||
| 1242 | print("xgraph, titleColor, missing titleColor,\n"); | ||
| 1243 | } | ||
| 1244 | } | ||
| 1245 | |||
| 1246 | =head2 sub titleFont | ||
| 1247 | |||
| 1248 | |||
| 1249 | =cut | ||
| 1250 | |||
| 1251 | sub titleFont { | ||
| 1252 | |||
| 1253 | my ( $self, $titleFont ) = @_; | ||
| 1254 | if ( $titleFont ne $empty_string ) { | ||
| 1255 | |||
| 1256 | $xgraph->{_titleFont} = $titleFont; | ||
| 1257 | $xgraph->{_note} = | ||
| 1258 | $xgraph->{_note} . ' titleFont=' . $xgraph->{_titleFont}; | ||
| 1259 | $xgraph->{_Step} = | ||
| 1260 | $xgraph->{_Step} . ' titleFont=' . $xgraph->{_titleFont}; | ||
| 1261 | |||
| 1262 | } | ||
| 1263 | else { | ||
| 1264 | print("xgraph, titleFont, missing titleFont,\n"); | ||
| 1265 | } | ||
| 1266 | } | ||
| 1267 | |||
| 1268 | =head2 sub width | ||
| 1269 | |||
| 1270 | |||
| 1271 | =cut | ||
| 1272 | |||
| 1273 | sub width { | ||
| 1274 | |||
| 1275 | my ( $self, $width ) = @_; | ||
| 1276 | if ( $width ne $empty_string ) { | ||
| 1277 | |||
| 1278 | $xgraph->{_width} = $width; | ||
| 1279 | $xgraph->{_note} = $xgraph->{_note} . ' width=' . $xgraph->{_width}; | ||
| 1280 | $xgraph->{_Step} = $xgraph->{_Step} . ' width=' . $xgraph->{_width}; | ||
| 1281 | |||
| 1282 | } | ||
| 1283 | else { | ||
| 1284 | print("xgraph, width, missing width,\n"); | ||
| 1285 | } | ||
| 1286 | } | ||
| 1287 | |||
| 1288 | =head2 sub windowtitle | ||
| 1289 | |||
| 1290 | |||
| 1291 | =cut | ||
| 1292 | |||
| 1293 | sub windowtitle { | ||
| 1294 | |||
| 1295 | my ( $self, $windowtitle ) = @_; | ||
| 1296 | if ( $windowtitle ne $empty_string ) { | ||
| 1297 | |||
| 1298 | $xgraph->{_windowtitle} = $windowtitle; | ||
| 1299 | $xgraph->{_note} = | ||
| 1300 | $xgraph->{_note} . ' windowtitle=' . $xgraph->{_windowtitle}; | ||
| 1301 | $xgraph->{_Step} = | ||
| 1302 | $xgraph->{_Step} . ' windowtitle=' . $xgraph->{_windowtitle}; | ||
| 1303 | |||
| 1304 | } | ||
| 1305 | else { | ||
| 1306 | print("xgraph, windowtitle, missing windowtitle,\n"); | ||
| 1307 | } | ||
| 1308 | } | ||
| 1309 | |||
| 1310 | =head2 sub x1_min | ||
| 1311 | |||
| 1312 | value at which axis 1 begins | ||
| 1313 | |||
| 1314 | =cut | ||
| 1315 | |||
| 1316 | sub x1_min { | ||
| 1317 | |||
| 1318 | my ( $self, $x1beg ) = @_; | ||
| 1319 | if ( $x1beg ne $empty_string ) { | ||
| 1320 | |||
| 1321 | $xgraph->{_x1beg} = $x1beg; | ||
| 1322 | $xgraph->{_note} = $xgraph->{_note} . ' x1beg=' . $xgraph->{_x1beg}; | ||
| 1323 | $xgraph->{_Step} = $xgraph->{_Step} . ' x1beg=' . $xgraph->{_x1beg}; | ||
| 1324 | |||
| 1325 | } | ||
| 1326 | else { | ||
| 1327 | print("xgraph, x1_min, missing x1_min,\n"); | ||
| 1328 | } | ||
| 1329 | } | ||
| 1330 | |||
| 1331 | =head2 sub x1_max | ||
| 1332 | |||
| 1333 | value at which axis 1 ends | ||
| 1334 | |||
| 1335 | =cut | ||
| 1336 | |||
| 1337 | sub x1_max { | ||
| 1338 | |||
| 1339 | my ( $self, $x1end ) = @_; | ||
| 1340 | if ( $x1end ne $empty_string ) { | ||
| 1341 | |||
| 1342 | $xgraph->{_x1end} = $x1end; | ||
| 1343 | $xgraph->{_note} = $xgraph->{_note} . ' x1end=' . $xgraph->{_x1end}; | ||
| 1344 | $xgraph->{_Step} = $xgraph->{_Step} . ' x1end=' . $xgraph->{_x1end}; | ||
| 1345 | |||
| 1346 | } | ||
| 1347 | else { | ||
| 1348 | print("xgraph, x1_max, missing x1_max,\n"); | ||
| 1349 | } | ||
| 1350 | } | ||
| 1351 | |||
| 1352 | =head2 sub x1beg | ||
| 1353 | |||
| 1354 | value at which axis 1 begins | ||
| 1355 | |||
| 1356 | =cut | ||
| 1357 | |||
| 1358 | sub x1beg { | ||
| 1359 | |||
| 1360 | my ( $self, $x1beg ) = @_; | ||
| 1361 | if ( $x1beg ne $empty_string ) { | ||
| 1362 | |||
| 1363 | $xgraph->{_x1beg} = $x1beg; | ||
| 1364 | $xgraph->{_note} = $xgraph->{_note} . ' x1beg=' . $xgraph->{_x1beg}; | ||
| 1365 | $xgraph->{_Step} = $xgraph->{_Step} . ' x1beg=' . $xgraph->{_x1beg}; | ||
| 1366 | |||
| 1367 | } | ||
| 1368 | else { | ||
| 1369 | print("xgraph, x1beg, missing x1beg,\n"); | ||
| 1370 | } | ||
| 1371 | } | ||
| 1372 | |||
| 1373 | =head2 sub x1end | ||
| 1374 | |||
| 1375 | value at which axis 1 ends | ||
| 1376 | |||
| 1377 | =cut | ||
| 1378 | |||
| 1379 | sub x1end { | ||
| 1380 | |||
| 1381 | my ( $self, $x1end ) = @_; | ||
| 1382 | if ( $x1end ne $empty_string ) { | ||
| 1383 | |||
| 1384 | $xgraph->{_x1end} = $x1end; | ||
| 1385 | $xgraph->{_note} = $xgraph->{_note} . ' x1end=' . $xgraph->{_x1end}; | ||
| 1386 | $xgraph->{_Step} = $xgraph->{_Step} . ' x1end=' . $xgraph->{_x1end}; | ||
| 1387 | |||
| 1388 | } | ||
| 1389 | else { | ||
| 1390 | print("xgraph, x1end, missing x1end,\n"); | ||
| 1391 | } | ||
| 1392 | } | ||
| 1393 | |||
| 1394 | =head2 sub x_label | ||
| 1395 | |||
| 1396 | label on axis 2 | ||
| 1397 | |||
| 1398 | =cut | ||
| 1399 | |||
| 1400 | sub x_label { | ||
| 1401 | |||
| 1402 | my ( $self, $label2 ) = @_; | ||
| 1403 | if ( $label2 ne $empty_string ) { | ||
| 1404 | |||
| 1405 | $xgraph->{_label1} = $label2; | ||
| 1406 | $xgraph->{_note} = $xgraph->{_note} . ' label2=' . $xgraph->{_label2}; | ||
| 1407 | $xgraph->{_Step} = $xgraph->{_Step} . ' label2=' . $xgraph->{_label2}; | ||
| 1408 | |||
| 1409 | } | ||
| 1410 | else { | ||
| 1411 | print("xgraph, x_label, missing x_label,\n"); | ||
| 1412 | } | ||
| 1413 | } | ||
| 1414 | |||
| 1415 | =head2 sub x2beg | ||
| 1416 | |||
| 1417 | value at which axis 2 begins | ||
| 1418 | |||
| 1419 | =cut | ||
| 1420 | |||
| 1421 | sub x2beg { | ||
| 1422 | |||
| 1423 | my ( $self, $x2beg ) = @_; | ||
| 1424 | if ( $x2beg ne $empty_string ) { | ||
| 1425 | |||
| 1426 | $xgraph->{_x2beg} = $x2beg; | ||
| 1427 | $xgraph->{_note} = $xgraph->{_note} . ' x2beg=' . $xgraph->{_x2beg}; | ||
| 1428 | $xgraph->{_Step} = $xgraph->{_Step} . ' x2beg=' . $xgraph->{_x2beg}; | ||
| 1429 | |||
| 1430 | } | ||
| 1431 | else { | ||
| 1432 | print("xgraph, x2beg, missing x2beg,\n"); | ||
| 1433 | } | ||
| 1434 | } | ||
| 1435 | |||
| 1436 | =head2 sub x2_min | ||
| 1437 | |||
| 1438 | value at which axis 2 begins | ||
| 1439 | |||
| 1440 | =cut | ||
| 1441 | |||
| 1442 | sub x2_min { | ||
| 1443 | |||
| 1444 | my ( $self, $x2beg ) = @_; | ||
| 1445 | if ( $x2beg ne $empty_string ) { | ||
| 1446 | |||
| 1447 | $xgraph->{_x2beg} = $x2beg; | ||
| 1448 | $xgraph->{_note} = $xgraph->{_note} . ' x2beg=' . $xgraph->{_x2beg}; | ||
| 1449 | $xgraph->{_Step} = $xgraph->{_Step} . ' x2beg=' . $xgraph->{_x2beg}; | ||
| 1450 | |||
| 1451 | } | ||
| 1452 | else { | ||
| 1453 | print("xgraph, x2_min, missing x2_min,\n"); | ||
| 1454 | } | ||
| 1455 | } | ||
| 1456 | |||
| 1457 | =head2 sub x2_max | ||
| 1458 | |||
| 1459 | value at which axis 2 ends | ||
| 1460 | |||
| 1461 | =cut | ||
| 1462 | |||
| 1463 | sub x2_max { | ||
| 1464 | |||
| 1465 | my ( $self, $x2end ) = @_; | ||
| 1466 | if ( $x2end ne $empty_string ) { | ||
| 1467 | |||
| 1468 | $xgraph->{_x2end} = $x2end; | ||
| 1469 | $xgraph->{_note} = $xgraph->{_note} . ' x2end=' . $xgraph->{_x2end}; | ||
| 1470 | $xgraph->{_Step} = $xgraph->{_Step} . ' x2end=' . $xgraph->{_x2end}; | ||
| 1471 | |||
| 1472 | } | ||
| 1473 | else { | ||
| 1474 | print("xgraph, x2_max, missing x2_max,\n"); | ||
| 1475 | } | ||
| 1476 | } | ||
| 1477 | |||
| 1478 | =head2 sub x2end | ||
| 1479 | |||
| 1480 | value at which axis 2 ends | ||
| 1481 | |||
| 1482 | =cut | ||
| 1483 | |||
| 1484 | sub x2end { | ||
| 1485 | |||
| 1486 | my ( $self, $x2end ) = @_; | ||
| 1487 | if ( $x2end ne $empty_string ) { | ||
| 1488 | |||
| 1489 | $xgraph->{_x2end} = $x2end; | ||
| 1490 | $xgraph->{_note} = $xgraph->{_note} . ' x2end=' . $xgraph->{_x2end}; | ||
| 1491 | $xgraph->{_Step} = $xgraph->{_Step} . ' x2end=' . $xgraph->{_x2end}; | ||
| 1492 | |||
| 1493 | } | ||
| 1494 | else { | ||
| 1495 | print("xgraph, x2end, missing x2end,\n"); | ||
| 1496 | } | ||
| 1497 | } | ||
| 1498 | |||
| 1499 | =head2 sub y_label | ||
| 1500 | |||
| 1501 | label on axis 1 | ||
| 1502 | |||
| 1503 | =cut | ||
| 1504 | |||
| 1505 | sub y_label { | ||
| 1506 | |||
| 1507 | my ( $self, $label1 ) = @_; | ||
| 1508 | if ( $label1 ne $empty_string ) { | ||
| 1509 | |||
| 1510 | $xgraph->{_label1} = $label1; | ||
| 1511 | $xgraph->{_note} = $xgraph->{_note} . ' label1=' . $xgraph->{_label1}; | ||
| 1512 | $xgraph->{_Step} = $xgraph->{_Step} . ' label1=' . $xgraph->{_label1}; | ||
| 1513 | |||
| 1514 | } | ||
| 1515 | else { | ||
| 1516 | print("xgraph, y_label, missing y_label,\n"); | ||
| 1517 | } | ||
| 1518 | } | ||
| 1519 | |||
| 1520 | =head2 sub get_max_index | ||
| 1521 | |||
| 1522 | max index = number of input variables -1 | ||
| 1523 | |||
| 1524 | =cut | ||
| 1525 | |||
| 1526 | sub get_max_index { | ||
| 1527 | my ($self) = @_; | ||
| 1528 | my $max_index = 34; | ||
| 1529 | |||
| 1530 | return ($max_index); | ||
| 1531 | } | ||
| 1532 | |||
| 1533 | 1; |