lib/App/SeismicUnixGui/sunix/plot/xcontour.pm untested

filter: Statementstmt 0.0% 0 / 378 Branchbran 0.0% 0 / 98 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 57 Podpod 0.0% 0 / 53 totaltotal 0.0% 0 / 586 CC 50 SCAR 17.4
CC
50
Cov
0%
CWBackingStore
6.0
c
6.0
ccolor
6.0
CRAP 5.7
1 package App::SeismicUnixGui::sunix::plot::xcontour;
2  
3 =head2 SYNOPSIS
4  
5 PERL PROGRAM NAME:
6  
7 AUTHOR:
8  
9 DATE:
10  
11 DESCRIPTION:
12  
13 Version:
14  
15 =head2 USE
16  
17 =head3 NOTES
18  
19 =head4 Examples
20  
21 =head2 SYNOPSIS
22  
23 =head3 SEISMIC UNIX NOTES
24 XCONTOUR - X CONTOUR plot of f(x1,x2) via vector plot call
25  
26  
27  
28 xcontour n1= [optional parameters] <binaryfile [>psplotfile]
29  
30  
31  
32 X Functionality:
33  
34 Button 1 Zoom with rubberband box
35  
36 Button 2 Show mouse (x1,x2) coordinates while pressed
37  
38 q or Q key Quit
39  
40 s key Save current mouse (x1,x2) location to file
41  
42 p or P key Plot current window with pswigb (only from disk files)
43  
44  
45  
46 Required Parameters:
47  
48 n1 number of samples in 1st (fast) dimension
49  
50  
51  
52 Optional Parameters:
53  
54 d1=1.0 sampling interval in 1st dimension
55  
56 f1=0.0 first sample in 1st dimension
57  
58 x1=f1,f1+d1,... array of sampled values in 1nd dimension
59  
60 n2=all number of samples in 2nd (slow) dimension
61  
62 d2=1.0 sampling interval in 2nd dimension
63  
64 f2=0.0 first sample in 2nd dimension
65  
66 x2=f2,f2+d2,... array of sampled values in 2nd dimension
67  
68 mpicks=/dev/tty file to save mouse picks in
69  
70 verbose=1 =1 for info printed on stderr (0 for no info)
71  
72 nc=5 number of contour values
73  
74 dc=(zmax-zmin)/nc contour interval
75  
76 fc=min+dc first contour
77  
78 c=fc,fc+dc,... array of contour values
79  
80 cwidth=1.0,... array of contour line widths
81  
82 ccolor=none,... array of contour colors; none means use cgray
83  
84 cdash=0.0,... array of dash spacings (0.0 for solid)
85  
86 labelcf=1 first labeled contour (1,2,3,...)
87  
88 labelcper=1 label every labelcper-th contour
89  
90 nlabelc=nc number of labeled contours (0 no contour label)
91  
92 nplaces=6 number of decimal places in contour labeling
93  
94 xbox=50 x in pixels of upper left corner of window
95  
96 ybox=50 y in pixels of upper left corner of window
97  
98 wbox=550 width in pixels of window
99  
100 hbox=700 height in pixels of window
101  
102 x1beg=x1min value at which axis 1 begins
103  
104 x1end=x1max value at which axis 1 ends
105  
106 d1num=0.0 numbered tic interval on axis 1 (0.0 for automatic)
107  
108 f1num=x1min first numbered tic on axis 1 (used if d1num not 0.0)
109  
110 n1tic=1 number of tics per numbered tic on axis 1
111  
112 grid1=none grid lines on axis 1 - none, dot, dash, or solid
113  
114 x2beg=x2min value at which axis 2 begins
115  
116 x2end=x2max value at which axis 2 ends
117  
118 d2num=0.0 numbered tic interval on axis 2 (0.0 for automatic)
119  
120 f2num=x2min first numbered tic on axis 2 (used if d2num not 0.0)
121  
122 n2tic=1 number of tics per numbered tic on axis 2
123  
124 grid2=none grid lines on axis 2 - none, dot, dash, or solid
125  
126 label2= label on axis 2
127  
128 labelfont=Erg14 font name for axes labels
129  
130 title= title of plot
131  
132 titlefont=Rom22 font name for title
133  
134 windowtitle=xwigb title on window
135  
136 labelcolor=blue color for axes labels
137  
138 titlecolor=red color for title
139  
140 gridcolor=blue color for grid lines
141  
142 labelccolor=black color of contour labels ",
143  
144 labelcfont=fixed font name for contour labels
145  
146 style=seismic normal (axis 1 horizontal, axis 2 vertical) or
147  
148 seismic (axis 1 vertical, axis 2 horizontal)
149  
150  
151  
152  
153  
154 Notes:
155  
156 For some reason the contour might slight differ from ones generated
157  
158 by pscontour (propably due to the pixel nature of the plot
159  
160 coordinates)
161  
162  
163  
164 The line width of unlabeled contours is designed as a quarter of that
165  
166 of labeled contours.
167  
168  
169  
170  
171  
172 Author: Morten Wendell Pedersen, Aarhus University
173  
174  
175  
176 All the coding is based on snippets taken from xwigb, ximage and pscontour
177  
178 All I have done is put the parts together and put in some bugs ;-)
179  
180  
181  
182 So credits should go to the authors of these packages...
183  
184  
185  
186 Caveats and Notes:
187  
188 The code has been developed under Linux 1.3.20/Xfree 3.1.2E (X11 6.1)
189  
190 with gcc-2.7.0 But hopefully it should work on other platforms as well
191  
192  
193  
194 Since all the contours are drawn by Vector plot call's everytime the
195  
196 Window is exposed, the exposing can be darn slow
197  
198 OOPS This should be history... Now I keep my window content with backing
199  
200 store so I won't have to redraw my window unless I really have to...
201  
202  
203  
204 Portability Question: I guess I should check if the display supports
205  
206 backingstore and redraw if it doesn't (see DoesBackingStore(3) )
207  
208 I have to be able to use CWBackingStore==Always (other values can be
209  
210 NonUseful and WhenMapped
211  
212  
213  
214 Since I put the contour labels everytime I draw one contour level the area
215  
216 that contains the label will be crossed by the the next contour lines...
217  
218 (this bug also seems to be present in pscontour)
219  
220 To fix this I have to redraw all the labels after been through all
221  
222 the contour calls
223  
224 Right now I can't see a way to fix this without actually to through
225  
226 the entire label positioning again....Overkill I would say
227  
228  
229  
230
231  
232 The relative short length of the contour segments will propably mask the
233  
234 cdash settings
235  
236 which means it is disposable (but I know how to draw dashed lines :)
237  
238 A way of fixing this could be to get all connected point and then use
239  
240 XDrawlines or XDrawSegments... just an idea...No idea if it'll work.
241  
242  
243  
244 I think there is a bug in xContour since my plot coordinates increase
245  
246 North and west ward instead of south and eastward
247  
248  
249  
250 I need to check the Self Doc so if the right parameters are described
251  
252 (I have been through it a couple of times but....)
253  
254  
255  
256 All functions need a heavy cleanup for unused variables
257  
258 I suppose there is a couple of memory leaks due to missing free'ing of
259  
260 numerous pointers (especially fonts,GC's & colors could be a problem...
261  
262  
263  
264 I have to browse through the internal pscontour call... basically what
265  
266 I have done is just putting pscontour instead of pswigb... Instead of
267  
268 repositioning the input file pointer (which doesnt work with pipes) one
269  
270 should consider the use of temporary file
271  
272 or write your zoombox to pscontour (...how one does that?)
273  
274  
275  
276 Wish List:
277  
278 The use of cgray's unused until now... I guess I'll need to allocate
279  
280 a gray Colormap -> meaning that the code not will run at other display
281  
282 than 8 bit Pseudocolor :( (with the use of present version of the colormap
283  
284 library (code in $CWPROOT/src/xplot/lib ) )
285  
286  
287  
288 The format of contour label should be open for the user..
289  
290
291  
292 It could be nice if one could choose to have a pixmap (like ximage )
293  
294 underlying the contours... this should be defined either by the input
295  
296 data or by a seperate file
297  
298 eg useful for viewing traveltime contours on top a plot of the velocity
299  
300 field
301  
302  
303  
304 =head2 User's notes (Juan Lorenzo)
305 untested
306  
307 =cut
308  
309  
310 =head2 CHANGES and their DATES
311  
312 =cut
313  
314 use Moose;
315 our $VERSION = '0.0.1';
316  
317  
318 =head2 Import packages
319  
320 =cut
321  
322 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
323  
324 use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
325 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
326  
327  
328 =head2 instantiation of packages
329  
330 =cut
331  
332 my $get = L_SU_global_constants->new();
333 my $Project = Project_config->new();
334 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
335 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
336 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
337  
338 my $PS_SEISMIC = $Project->PS_SEISMIC();
339  
340 my $var = $get->var();
341 my $on = $var->{_on};
342 my $off = $var->{_off};
343 my $true = $var->{_true};
344 my $false = $var->{_false};
345 my $empty_string = $var->{_empty_string};
346  
347 =head2 Encapsulated
348 hash of private variables
349  
350 =cut
351  
352 my $xcontour = {
353 _CWBackingStore => '',
354 _c => '',
355 _ccolor => '',
356 _cdash => '',
357 _cwidth => '',
358 _d1 => '',
359 _d1num => '',
360 _d2 => '',
361 _d2num => '',
362 _dc => '',
363 _f1 => '',
364 _f1num => '',
365 _f2 => '',
366 _f2num => '',
367 _fc => '',
368 _grid1 => '',
369 _grid2 => '',
370 _gridcolor => '',
371 _hbox => '',
372 _label2 => '',
373 _labelccolor => '',
374 _labelcf => '',
375 _labelcfont => '',
376 _labelcolor => '',
377 _labelcper => '',
378 _labelfont => '',
379 _mpicks => '',
380 _n1 => '',
381 _n1tic => '',
382 _n2 => '',
383 _n2tic => '',
384 _nc => '',
385 _nlabelc => '',
386 _nplaces => '',
387 _style => '',
388 _title => '',
389 _titlecolor => '',
390 _titlefont => '',
391 _verbose => '',
392 _wbox => '',
393 _windowtitle => '',
394 _x1 => '',
395 _x1beg => '',
396 _x1end => '',
397 _x2 => '',
398 _x2beg => '',
399 _x2end => '',
400 _xbox => '',
401 _ybox => '',
402 _Step => '',
403 _note => '',
404  
405 };
406  
407 =head2 sub Step
408  
409 collects switches and assembles bash instructions
410 by adding the program name
411  
412 =cut
413  
414 sub Step {
415  
416 $xcontour->{_Step} = 'xcontour'.$xcontour->{_Step};
417 return ( $xcontour->{_Step} );
418  
419 }
420  
421  
422 =head2 sub note
423  
424 collects switches and assembles bash instructions
425 by adding the program name
426  
427 =cut
428  
429 sub note {
430  
431 $xcontour->{_note} = 'xcontour'.$xcontour->{_note};
432 return ( $xcontour->{_note} );
433  
434 }
435  
436  
437  
438 =head2 sub clear
439  
440 =cut
441  
442 sub clear {
443  
444 $xcontour->{_CWBackingStore} = '';
445 $xcontour->{_c} = '';
446 $xcontour->{_ccolor} = '';
447 $xcontour->{_cdash} = '';
448 $xcontour->{_cwidth} = '';
449 $xcontour->{_d1} = '';
450 $xcontour->{_d1num} = '';
451 $xcontour->{_d2} = '';
452 $xcontour->{_d2num} = '';
453 $xcontour->{_dc} = '';
454 $xcontour->{_f1} = '';
455 $xcontour->{_f1num} = '';
456 $xcontour->{_f2} = '';
457 $xcontour->{_f2num} = '';
458 $xcontour->{_fc} = '';
459 $xcontour->{_grid1} = '';
460 $xcontour->{_grid2} = '';
461 $xcontour->{_gridcolor} = '';
462 $xcontour->{_hbox} = '';
463 $xcontour->{_label2} = '';
464 $xcontour->{_labelccolor} = '';
465 $xcontour->{_labelcf} = '';
466 $xcontour->{_labelcfont} = '';
467 $xcontour->{_labelcolor} = '';
468 $xcontour->{_labelcper} = '';
469 $xcontour->{_labelfont} = '';
470 $xcontour->{_mpicks} = '';
471 $xcontour->{_n1} = '';
472 $xcontour->{_n1tic} = '';
473 $xcontour->{_n2} = '';
474 $xcontour->{_n2tic} = '';
475 $xcontour->{_nc} = '';
476 $xcontour->{_nlabelc} = '';
477 $xcontour->{_nplaces} = '';
478 $xcontour->{_style} = '';
479 $xcontour->{_title} = '';
480 $xcontour->{_titlecolor} = '';
481 $xcontour->{_titlefont} = '';
482 $xcontour->{_verbose} = '';
483 $xcontour->{_wbox} = '';
484 $xcontour->{_windowtitle} = '';
485 $xcontour->{_x1} = '';
486 $xcontour->{_x1beg} = '';
487 $xcontour->{_x1end} = '';
488 $xcontour->{_x2} = '';
489 $xcontour->{_x2beg} = '';
490 $xcontour->{_x2end} = '';
491 $xcontour->{_xbox} = '';
492 $xcontour->{_ybox} = '';
493 $xcontour->{_Step} = '';
494 $xcontour->{_note} = '';
495 }
496  
497  
498 =head2 sub CWBackingStore
499  
500  
501 =cut
502  
503 sub CWBackingStore {
504  
505 my ( $self,$CWBackingStore ) = @_;
506 if ( $CWBackingStore ne $empty_string ) {
507  
508 $xcontour->{_CWBackingStore} = $CWBackingStore;
509 $xcontour->{_note} = $xcontour->{_note}.' CWBackingStore='.$xcontour->{_CWBackingStore};
510 $xcontour->{_Step} = $xcontour->{_Step}.' CWBackingStore='.$xcontour->{_CWBackingStore};
511  
512 } else {
513 print("xcontour, CWBackingStore, missing CWBackingStore,\n");
514 }
515 }
516  
517  
518 =head2 sub c
519  
520  
521 =cut
522  
523 sub c {
524  
525 my ( $self,$c ) = @_;
526 if ( $c ne $empty_string ) {
527  
528 $xcontour->{_c} = $c;
529 $xcontour->{_note} = $xcontour->{_note}.' c='.$xcontour->{_c};
530 $xcontour->{_Step} = $xcontour->{_Step}.' c='.$xcontour->{_c};
531  
532 } else {
533 print("xcontour, c, missing c,\n");
534 }
535 }
536  
537  
538 =head2 sub ccolor
539  
540  
541 =cut
542  
543 sub ccolor {
544  
545 my ( $self,$ccolor ) = @_;
546 if ( $ccolor ne $empty_string ) {
547  
548 $xcontour->{_ccolor} = $ccolor;
549 $xcontour->{_note} = $xcontour->{_note}.' ccolor='.$xcontour->{_ccolor};
550 $xcontour->{_Step} = $xcontour->{_Step}.' ccolor='.$xcontour->{_ccolor};
551  
552 } else {
553 print("xcontour, ccolor, missing ccolor,\n");
554 }
555 }
556  
557  
558 =head2 sub cdash
559  
560  
561 =cut
562  
563 sub cdash {
564  
565 my ( $self,$cdash ) = @_;
566 if ( $cdash ne $empty_string ) {
567  
568 $xcontour->{_cdash} = $cdash;
569 $xcontour->{_note} = $xcontour->{_note}.' cdash='.$xcontour->{_cdash};
570 $xcontour->{_Step} = $xcontour->{_Step}.' cdash='.$xcontour->{_cdash};
571  
572 } else {
573 print("xcontour, cdash, missing cdash,\n");
574 }
575 }
576  
577  
578 =head2 sub cwidth
579  
580  
581 =cut
582  
583 sub cwidth {
584  
585 my ( $self,$cwidth ) = @_;
586 if ( $cwidth ne $empty_string ) {
587  
588 $xcontour->{_cwidth} = $cwidth;
589 $xcontour->{_note} = $xcontour->{_note}.' cwidth='.$xcontour->{_cwidth};
590 $xcontour->{_Step} = $xcontour->{_Step}.' cwidth='.$xcontour->{_cwidth};
591  
592 } else {
593 print("xcontour, cwidth, missing cwidth,\n");
594 }
595 }
596  
597  
598 =head2 sub d1
599  
600  
601 =cut
602  
603 sub d1 {
604  
605 my ( $self,$d1 ) = @_;
606 if ( $d1 ne $empty_string ) {
607  
608 $xcontour->{_d1} = $d1;
609 $xcontour->{_note} = $xcontour->{_note}.' d1='.$xcontour->{_d1};
610 $xcontour->{_Step} = $xcontour->{_Step}.' d1='.$xcontour->{_d1};
611  
612 } else {
613 print("xcontour, d1, missing d1,\n");
614 }
615 }
616  
617  
618 =head2 sub d1num
619  
620  
621 =cut
622  
623 sub d1num {
624  
625 my ( $self,$d1num ) = @_;
626 if ( $d1num ne $empty_string ) {
627  
628 $xcontour->{_d1num} = $d1num;
629 $xcontour->{_note} = $xcontour->{_note}.' d1num='.$xcontour->{_d1num};
630 $xcontour->{_Step} = $xcontour->{_Step}.' d1num='.$xcontour->{_d1num};
631  
632 } else {
633 print("xcontour, d1num, missing d1num,\n");
634 }
635 }
636  
637  
638 =head2 sub d2
639  
640  
641 =cut
642  
643 sub d2 {
644  
645 my ( $self,$d2 ) = @_;
646 if ( $d2 ne $empty_string ) {
647  
648 $xcontour->{_d2} = $d2;
649 $xcontour->{_note} = $xcontour->{_note}.' d2='.$xcontour->{_d2};
650 $xcontour->{_Step} = $xcontour->{_Step}.' d2='.$xcontour->{_d2};
651  
652 } else {
653 print("xcontour, d2, missing d2,\n");
654 }
655 }
656  
657  
658 =head2 sub d2num
659  
660  
661 =cut
662  
663 sub d2num {
664  
665 my ( $self,$d2num ) = @_;
666 if ( $d2num ne $empty_string ) {
667  
668 $xcontour->{_d2num} = $d2num;
669 $xcontour->{_note} = $xcontour->{_note}.' d2num='.$xcontour->{_d2num};
670 $xcontour->{_Step} = $xcontour->{_Step}.' d2num='.$xcontour->{_d2num};
671  
672 } else {
673 print("xcontour, d2num, missing d2num,\n");
674 }
675 }
676  
677  
678 =head2 sub dc
679  
680  
681 =cut
682  
683 sub dc {
684  
685 my ( $self,$dc ) = @_;
686 if ( $dc ne $empty_string ) {
687  
688 $xcontour->{_dc} = $dc;
689 $xcontour->{_note} = $xcontour->{_note}.' dc='.$xcontour->{_dc};
690 $xcontour->{_Step} = $xcontour->{_Step}.' dc='.$xcontour->{_dc};
691  
692 } else {
693 print("xcontour, dc, missing dc,\n");
694 }
695 }
696  
697  
698 =head2 sub f1
699  
700  
701 =cut
702  
703 sub f1 {
704  
705 my ( $self,$f1 ) = @_;
706 if ( $f1 ne $empty_string ) {
707  
708 $xcontour->{_f1} = $f1;
709 $xcontour->{_note} = $xcontour->{_note}.' f1='.$xcontour->{_f1};
710 $xcontour->{_Step} = $xcontour->{_Step}.' f1='.$xcontour->{_f1};
711  
712 } else {
713 print("xcontour, f1, missing f1,\n");
714 }
715 }
716  
717  
718 =head2 sub f1num
719  
720  
721 =cut
722  
723 sub f1num {
724  
725 my ( $self,$f1num ) = @_;
726 if ( $f1num ne $empty_string ) {
727  
728 $xcontour->{_f1num} = $f1num;
729 $xcontour->{_note} = $xcontour->{_note}.' f1num='.$xcontour->{_f1num};
730 $xcontour->{_Step} = $xcontour->{_Step}.' f1num='.$xcontour->{_f1num};
731  
732 } else {
733 print("xcontour, f1num, missing f1num,\n");
734 }
735 }
736  
737  
738 =head2 sub f2
739  
740  
741 =cut
742  
743 sub f2 {
744  
745 my ( $self,$f2 ) = @_;
746 if ( $f2 ne $empty_string ) {
747  
748 $xcontour->{_f2} = $f2;
749 $xcontour->{_note} = $xcontour->{_note}.' f2='.$xcontour->{_f2};
750 $xcontour->{_Step} = $xcontour->{_Step}.' f2='.$xcontour->{_f2};
751  
752 } else {
753 print("xcontour, f2, missing f2,\n");
754 }
755 }
756  
757  
758 =head2 sub f2num
759  
760  
761 =cut
762  
763 sub f2num {
764  
765 my ( $self,$f2num ) = @_;
766 if ( $f2num ne $empty_string ) {
767  
768 $xcontour->{_f2num} = $f2num;
769 $xcontour->{_note} = $xcontour->{_note}.' f2num='.$xcontour->{_f2num};
770 $xcontour->{_Step} = $xcontour->{_Step}.' f2num='.$xcontour->{_f2num};
771  
772 } else {
773 print("xcontour, f2num, missing f2num,\n");
774 }
775 }
776  
777  
778 =head2 sub fc
779  
780  
781 =cut
782  
783 sub fc {
784  
785 my ( $self,$fc ) = @_;
786 if ( $fc ne $empty_string ) {
787  
788 $xcontour->{_fc} = $fc;
789 $xcontour->{_note} = $xcontour->{_note}.' fc='.$xcontour->{_fc};
790 $xcontour->{_Step} = $xcontour->{_Step}.' fc='.$xcontour->{_fc};
791  
792 } else {
793 print("xcontour, fc, missing fc,\n");
794 }
795 }
796  
797  
798 =head2 sub grid1
799  
800  
801 =cut
802  
803 sub grid1 {
804  
805 my ( $self,$grid1 ) = @_;
806 if ( $grid1 ne $empty_string ) {
807  
808 $xcontour->{_grid1} = $grid1;
809 $xcontour->{_note} = $xcontour->{_note}.' grid1='.$xcontour->{_grid1};
810 $xcontour->{_Step} = $xcontour->{_Step}.' grid1='.$xcontour->{_grid1};
811  
812 } else {
813 print("xcontour, grid1, missing grid1,\n");
814 }
815 }
816  
817  
818 =head2 sub grid2
819  
820  
821 =cut
822  
823 sub grid2 {
824  
825 my ( $self,$grid2 ) = @_;
826 if ( $grid2 ne $empty_string ) {
827  
828 $xcontour->{_grid2} = $grid2;
829 $xcontour->{_note} = $xcontour->{_note}.' grid2='.$xcontour->{_grid2};
830 $xcontour->{_Step} = $xcontour->{_Step}.' grid2='.$xcontour->{_grid2};
831  
832 } else {
833 print("xcontour, grid2, missing grid2,\n");
834 }
835 }
836  
837  
838 =head2 sub gridcolor
839  
840  
841 =cut
842  
843 sub gridcolor {
844  
845 my ( $self,$gridcolor ) = @_;
846 if ( $gridcolor ne $empty_string ) {
847  
848 $xcontour->{_gridcolor} = $gridcolor;
849 $xcontour->{_note} = $xcontour->{_note}.' gridcolor='.$xcontour->{_gridcolor};
850 $xcontour->{_Step} = $xcontour->{_Step}.' gridcolor='.$xcontour->{_gridcolor};
851  
852 } else {
853 print("xcontour, gridcolor, missing gridcolor,\n");
854 }
855 }
856  
857  
858 =head2 sub hbox
859  
860  
861 =cut
862  
863 sub hbox {
864  
865 my ( $self,$hbox ) = @_;
866 if ( $hbox ne $empty_string ) {
867  
868 $xcontour->{_hbox} = $hbox;
869 $xcontour->{_note} = $xcontour->{_note}.' hbox='.$xcontour->{_hbox};
870 $xcontour->{_Step} = $xcontour->{_Step}.' hbox='.$xcontour->{_hbox};
871  
872 } else {
873 print("xcontour, hbox, missing hbox,\n");
874 }
875 }
876  
877  
878 =head2 sub label2
879  
880  
881 =cut
882  
883 sub label2 {
884  
885 my ( $self,$label2 ) = @_;
886 if ( $label2 ne $empty_string ) {
887  
888 $xcontour->{_label2} = $label2;
889 $xcontour->{_note} = $xcontour->{_note}.' label2='.$xcontour->{_label2};
890 $xcontour->{_Step} = $xcontour->{_Step}.' label2='.$xcontour->{_label2};
891  
892 } else {
893 print("xcontour, label2, missing label2,\n");
894 }
895 }
896  
897  
898 =head2 sub labelccolor
899  
900  
901 =cut
902  
903 sub labelccolor {
904  
905 my ( $self,$labelccolor ) = @_;
906 if ( $labelccolor ne $empty_string ) {
907  
908 $xcontour->{_labelccolor} = $labelccolor;
909 $xcontour->{_note} = $xcontour->{_note}.' labelccolor='.$xcontour->{_labelccolor};
910 $xcontour->{_Step} = $xcontour->{_Step}.' labelccolor='.$xcontour->{_labelccolor};
911  
912 } else {
913 print("xcontour, labelccolor, missing labelccolor,\n");
914 }
915 }
916  
917  
918 =head2 sub labelcf
919  
920  
921 =cut
922  
923 sub labelcf {
924  
925 my ( $self,$labelcf ) = @_;
926 if ( $labelcf ne $empty_string ) {
927  
928 $xcontour->{_labelcf} = $labelcf;
929 $xcontour->{_note} = $xcontour->{_note}.' labelcf='.$xcontour->{_labelcf};
930 $xcontour->{_Step} = $xcontour->{_Step}.' labelcf='.$xcontour->{_labelcf};
931  
932 } else {
933 print("xcontour, labelcf, missing labelcf,\n");
934 }
935 }
936  
937  
938 =head2 sub labelcfont
939  
940  
941 =cut
942  
943 sub labelcfont {
944  
945 my ( $self,$labelcfont ) = @_;
946 if ( $labelcfont ne $empty_string ) {
947  
948 $xcontour->{_labelcfont} = $labelcfont;
949 $xcontour->{_note} = $xcontour->{_note}.' labelcfont='.$xcontour->{_labelcfont};
950 $xcontour->{_Step} = $xcontour->{_Step}.' labelcfont='.$xcontour->{_labelcfont};
951  
952 } else {
953 print("xcontour, labelcfont, missing labelcfont,\n");
954 }
955 }
956  
957  
958 =head2 sub labelcolor
959  
960  
961 =cut
962  
963 sub labelcolor {
964  
965 my ( $self,$labelcolor ) = @_;
966 if ( $labelcolor ne $empty_string ) {
967  
968 $xcontour->{_labelcolor} = $labelcolor;
969 $xcontour->{_note} = $xcontour->{_note}.' labelcolor='.$xcontour->{_labelcolor};
970 $xcontour->{_Step} = $xcontour->{_Step}.' labelcolor='.$xcontour->{_labelcolor};
971  
972 } else {
973 print("xcontour, labelcolor, missing labelcolor,\n");
974 }
975 }
976  
977  
978 =head2 sub labelcper
979  
980  
981 =cut
982  
983 sub labelcper {
984  
985 my ( $self,$labelcper ) = @_;
986 if ( $labelcper ne $empty_string ) {
987  
988 $xcontour->{_labelcper} = $labelcper;
989 $xcontour->{_note} = $xcontour->{_note}.' labelcper='.$xcontour->{_labelcper};
990 $xcontour->{_Step} = $xcontour->{_Step}.' labelcper='.$xcontour->{_labelcper};
991  
992 } else {
993 print("xcontour, labelcper, missing labelcper,\n");
994 }
995 }
996  
997  
998 =head2 sub labelfont
999  
1000  
1001 =cut
1002  
1003 sub labelfont {
1004  
1005 my ( $self,$labelfont ) = @_;
1006 if ( $labelfont ne $empty_string ) {
1007  
1008 $xcontour->{_labelfont} = $labelfont;
1009 $xcontour->{_note} = $xcontour->{_note}.' labelfont='.$xcontour->{_labelfont};
1010 $xcontour->{_Step} = $xcontour->{_Step}.' labelfont='.$xcontour->{_labelfont};
1011  
1012 } else {
1013 print("xcontour, labelfont, missing labelfont,\n");
1014 }
1015 }
1016  
1017  
1018 =head2 sub mpicks
1019  
1020  
1021 =cut
1022  
1023 sub mpicks {
1024  
1025 my ( $self,$mpicks ) = @_;
1026 if ( $mpicks ne $empty_string ) {
1027  
1028 $xcontour->{_mpicks} = $mpicks;
1029 $xcontour->{_note} = $xcontour->{_note}.' mpicks='.$xcontour->{_mpicks};
1030 $xcontour->{_Step} = $xcontour->{_Step}.' mpicks='.$xcontour->{_mpicks};
1031  
1032 } else {
1033 print("xcontour, mpicks, missing mpicks,\n");
1034 }
1035 }
1036  
1037  
1038 =head2 sub n1
1039  
1040  
1041 =cut
1042  
1043 sub n1 {
1044  
1045 my ( $self,$n1 ) = @_;
1046 if ( $n1 ne $empty_string ) {
1047  
1048 $xcontour->{_n1} = $n1;
1049 $xcontour->{_note} = $xcontour->{_note}.' n1='.$xcontour->{_n1};
1050 $xcontour->{_Step} = $xcontour->{_Step}.' n1='.$xcontour->{_n1};
1051  
1052 } else {
1053 print("xcontour, n1, missing n1,\n");
1054 }
1055 }
1056  
1057  
1058 =head2 sub n1tic
1059  
1060  
1061 =cut
1062  
1063 sub n1tic {
1064  
1065 my ( $self,$n1tic ) = @_;
1066 if ( $n1tic ne $empty_string ) {
1067  
1068 $xcontour->{_n1tic} = $n1tic;
1069 $xcontour->{_note} = $xcontour->{_note}.' n1tic='.$xcontour->{_n1tic};
1070 $xcontour->{_Step} = $xcontour->{_Step}.' n1tic='.$xcontour->{_n1tic};
1071  
1072 } else {
1073 print("xcontour, n1tic, missing n1tic,\n");
1074 }
1075 }
1076  
1077  
1078 =head2 sub n2
1079  
1080  
1081 =cut
1082  
1083 sub n2 {
1084  
1085 my ( $self,$n2 ) = @_;
1086 if ( $n2 ne $empty_string ) {
1087  
1088 $xcontour->{_n2} = $n2;
1089 $xcontour->{_note} = $xcontour->{_note}.' n2='.$xcontour->{_n2};
1090 $xcontour->{_Step} = $xcontour->{_Step}.' n2='.$xcontour->{_n2};
1091  
1092 } else {
1093 print("xcontour, n2, missing n2,\n");
1094 }
1095 }
1096  
1097  
1098 =head2 sub n2tic
1099  
1100  
1101 =cut
1102  
1103 sub n2tic {
1104  
1105 my ( $self,$n2tic ) = @_;
1106 if ( $n2tic ne $empty_string ) {
1107  
1108 $xcontour->{_n2tic} = $n2tic;
1109 $xcontour->{_note} = $xcontour->{_note}.' n2tic='.$xcontour->{_n2tic};
1110 $xcontour->{_Step} = $xcontour->{_Step}.' n2tic='.$xcontour->{_n2tic};
1111  
1112 } else {
1113 print("xcontour, n2tic, missing n2tic,\n");
1114 }
1115 }
1116  
1117  
1118 =head2 sub nc
1119  
1120  
1121 =cut
1122  
1123 sub nc {
1124  
1125 my ( $self,$nc ) = @_;
1126 if ( $nc ne $empty_string ) {
1127  
1128 $xcontour->{_nc} = $nc;
1129 $xcontour->{_note} = $xcontour->{_note}.' nc='.$xcontour->{_nc};
1130 $xcontour->{_Step} = $xcontour->{_Step}.' nc='.$xcontour->{_nc};
1131  
1132 } else {
1133 print("xcontour, nc, missing nc,\n");
1134 }
1135 }
1136  
1137  
1138 =head2 sub nlabelc
1139  
1140  
1141 =cut
1142  
1143 sub nlabelc {
1144  
1145 my ( $self,$nlabelc ) = @_;
1146 if ( $nlabelc ne $empty_string ) {
1147  
1148 $xcontour->{_nlabelc} = $nlabelc;
1149 $xcontour->{_note} = $xcontour->{_note}.' nlabelc='.$xcontour->{_nlabelc};
1150 $xcontour->{_Step} = $xcontour->{_Step}.' nlabelc='.$xcontour->{_nlabelc};
1151  
1152 } else {
1153 print("xcontour, nlabelc, missing nlabelc,\n");
1154 }
1155 }
1156  
1157  
1158 =head2 sub nplaces
1159  
1160  
1161 =cut
1162  
1163 sub nplaces {
1164  
1165 my ( $self,$nplaces ) = @_;
1166 if ( $nplaces ne $empty_string ) {
1167  
1168 $xcontour->{_nplaces} = $nplaces;
1169 $xcontour->{_note} = $xcontour->{_note}.' nplaces='.$xcontour->{_nplaces};
1170 $xcontour->{_Step} = $xcontour->{_Step}.' nplaces='.$xcontour->{_nplaces};
1171  
1172 } else {
1173 print("xcontour, nplaces, missing nplaces,\n");
1174 }
1175 }
1176  
1177  
1178 =head2 sub style
1179  
1180  
1181 =cut
1182  
1183 sub style {
1184  
1185 my ( $self,$style ) = @_;
1186 if ( $style ne $empty_string ) {
1187  
1188 $xcontour->{_style} = $style;
1189 $xcontour->{_note} = $xcontour->{_note}.' style='.$xcontour->{_style};
1190 $xcontour->{_Step} = $xcontour->{_Step}.' style='.$xcontour->{_style};
1191  
1192 } else {
1193 print("xcontour, style, missing style,\n");
1194 }
1195 }
1196  
1197  
1198 =head2 sub title
1199  
1200  
1201 =cut
1202  
1203 sub title {
1204  
1205 my ( $self,$title ) = @_;
1206 if ( $title ne $empty_string ) {
1207  
1208 $xcontour->{_title} = $title;
1209 $xcontour->{_note} = $xcontour->{_note}.' title='.$xcontour->{_title};
1210 $xcontour->{_Step} = $xcontour->{_Step}.' title='.$xcontour->{_title};
1211  
1212 } else {
1213 print("xcontour, title, missing title,\n");
1214 }
1215 }
1216  
1217  
1218 =head2 sub titlecolor
1219  
1220  
1221 =cut
1222  
1223 sub titlecolor {
1224  
1225 my ( $self,$titlecolor ) = @_;
1226 if ( $titlecolor ne $empty_string ) {
1227  
1228 $xcontour->{_titlecolor} = $titlecolor;
1229 $xcontour->{_note} = $xcontour->{_note}.' titlecolor='.$xcontour->{_titlecolor};
1230 $xcontour->{_Step} = $xcontour->{_Step}.' titlecolor='.$xcontour->{_titlecolor};
1231  
1232 } else {
1233 print("xcontour, titlecolor, missing titlecolor,\n");
1234 }
1235 }
1236  
1237  
1238 =head2 sub titlefont
1239  
1240  
1241 =cut
1242  
1243 sub titlefont {
1244  
1245 my ( $self,$titlefont ) = @_;
1246 if ( $titlefont ne $empty_string ) {
1247  
1248 $xcontour->{_titlefont} = $titlefont;
1249 $xcontour->{_note} = $xcontour->{_note}.' titlefont='.$xcontour->{_titlefont};
1250 $xcontour->{_Step} = $xcontour->{_Step}.' titlefont='.$xcontour->{_titlefont};
1251  
1252 } else {
1253 print("xcontour, titlefont, missing titlefont,\n");
1254 }
1255 }
1256  
1257  
1258 =head2 sub verbose
1259  
1260  
1261 =cut
1262  
1263 sub verbose {
1264  
1265 my ( $self,$verbose ) = @_;
1266 if ( $verbose ne $empty_string ) {
1267  
1268 $xcontour->{_verbose} = $verbose;
1269 $xcontour->{_note} = $xcontour->{_note}.' verbose='.$xcontour->{_verbose};
1270 $xcontour->{_Step} = $xcontour->{_Step}.' verbose='.$xcontour->{_verbose};
1271  
1272 } else {
1273 print("xcontour, verbose, missing verbose,\n");
1274 }
1275 }
1276  
1277  
1278 =head2 sub wbox
1279  
1280  
1281 =cut
1282  
1283 sub wbox {
1284  
1285 my ( $self,$wbox ) = @_;
1286 if ( $wbox ne $empty_string ) {
1287  
1288 $xcontour->{_wbox} = $wbox;
1289 $xcontour->{_note} = $xcontour->{_note}.' wbox='.$xcontour->{_wbox};
1290 $xcontour->{_Step} = $xcontour->{_Step}.' wbox='.$xcontour->{_wbox};
1291  
1292 } else {
1293 print("xcontour, wbox, missing wbox,\n");
1294 }
1295 }
1296  
1297  
1298 =head2 sub windowtitle
1299  
1300  
1301 =cut
1302  
1303 sub windowtitle {
1304  
1305 my ( $self,$windowtitle ) = @_;
1306 if ( $windowtitle ne $empty_string ) {
1307  
1308 $xcontour->{_windowtitle} = $windowtitle;
1309 $xcontour->{_note} = $xcontour->{_note}.' windowtitle='.$xcontour->{_windowtitle};
1310 $xcontour->{_Step} = $xcontour->{_Step}.' windowtitle='.$xcontour->{_windowtitle};
1311  
1312 } else {
1313 print("xcontour, windowtitle, missing windowtitle,\n");
1314 }
1315 }
1316  
1317  
1318 =head2 sub x1
1319  
1320  
1321 =cut
1322  
1323 sub x1 {
1324  
1325 my ( $self,$x1 ) = @_;
1326 if ( $x1 ne $empty_string ) {
1327  
1328 $xcontour->{_x1} = $x1;
1329 $xcontour->{_note} = $xcontour->{_note}.' x1='.$xcontour->{_x1};
1330 $xcontour->{_Step} = $xcontour->{_Step}.' x1='.$xcontour->{_x1};
1331  
1332 } else {
1333 print("xcontour, x1, missing x1,\n");
1334 }
1335 }
1336  
1337  
1338 =head2 sub x1beg
1339  
1340  
1341 =cut
1342  
1343 sub x1beg {
1344  
1345 my ( $self,$x1beg ) = @_;
1346 if ( $x1beg ne $empty_string ) {
1347  
1348 $xcontour->{_x1beg} = $x1beg;
1349 $xcontour->{_note} = $xcontour->{_note}.' x1beg='.$xcontour->{_x1beg};
1350 $xcontour->{_Step} = $xcontour->{_Step}.' x1beg='.$xcontour->{_x1beg};
1351  
1352 } else {
1353 print("xcontour, x1beg, missing x1beg,\n");
1354 }
1355 }
1356  
1357  
1358 =head2 sub x1end
1359  
1360  
1361 =cut
1362  
1363 sub x1end {
1364  
1365 my ( $self,$x1end ) = @_;
1366 if ( $x1end ne $empty_string ) {
1367  
1368 $xcontour->{_x1end} = $x1end;
1369 $xcontour->{_note} = $xcontour->{_note}.' x1end='.$xcontour->{_x1end};
1370 $xcontour->{_Step} = $xcontour->{_Step}.' x1end='.$xcontour->{_x1end};
1371  
1372 } else {
1373 print("xcontour, x1end, missing x1end,\n");
1374 }
1375 }
1376  
1377  
1378 =head2 sub x2
1379  
1380  
1381 =cut
1382  
1383 sub x2 {
1384  
1385 my ( $self,$x2 ) = @_;
1386 if ( $x2 ne $empty_string ) {
1387  
1388 $xcontour->{_x2} = $x2;
1389 $xcontour->{_note} = $xcontour->{_note}.' x2='.$xcontour->{_x2};
1390 $xcontour->{_Step} = $xcontour->{_Step}.' x2='.$xcontour->{_x2};
1391  
1392 } else {
1393 print("xcontour, x2, missing x2,\n");
1394 }
1395 }
1396  
1397  
1398 =head2 sub x2beg
1399  
1400  
1401 =cut
1402  
1403 sub x2beg {
1404  
1405 my ( $self,$x2beg ) = @_;
1406 if ( $x2beg ne $empty_string ) {
1407  
1408 $xcontour->{_x2beg} = $x2beg;
1409 $xcontour->{_note} = $xcontour->{_note}.' x2beg='.$xcontour->{_x2beg};
1410 $xcontour->{_Step} = $xcontour->{_Step}.' x2beg='.$xcontour->{_x2beg};
1411  
1412 } else {
1413 print("xcontour, x2beg, missing x2beg,\n");
1414 }
1415 }
1416  
1417  
1418 =head2 sub x2end
1419  
1420  
1421 =cut
1422  
1423 sub x2end {
1424  
1425 my ( $self,$x2end ) = @_;
1426 if ( $x2end ne $empty_string ) {
1427  
1428 $xcontour->{_x2end} = $x2end;
1429 $xcontour->{_note} = $xcontour->{_note}.' x2end='.$xcontour->{_x2end};
1430 $xcontour->{_Step} = $xcontour->{_Step}.' x2end='.$xcontour->{_x2end};
1431  
1432 } else {
1433 print("xcontour, x2end, missing x2end,\n");
1434 }
1435 }
1436  
1437  
1438 =head2 sub xbox
1439  
1440  
1441 =cut
1442  
1443 sub xbox {
1444  
1445 my ( $self,$xbox ) = @_;
1446 if ( $xbox ne $empty_string ) {
1447  
1448 $xcontour->{_xbox} = $xbox;
1449 $xcontour->{_note} = $xcontour->{_note}.' xbox='.$xcontour->{_xbox};
1450 $xcontour->{_Step} = $xcontour->{_Step}.' xbox='.$xcontour->{_xbox};
1451  
1452 } else {
1453 print("xcontour, xbox, missing xbox,\n");
1454 }
1455 }
1456  
1457  
1458 =head2 sub ybox
1459  
1460  
1461 =cut
1462  
1463 sub ybox {
1464  
1465 my ( $self,$ybox ) = @_;
1466 if ( $ybox ne $empty_string ) {
1467  
1468 $xcontour->{_ybox} = $ybox;
1469 $xcontour->{_note} = $xcontour->{_note}.' ybox='.$xcontour->{_ybox};
1470 $xcontour->{_Step} = $xcontour->{_Step}.' ybox='.$xcontour->{_ybox};
1471  
1472 } else {
1473 print("xcontour, ybox, missing ybox,\n");
1474 }
1475 }
1476  
1477  
1478 =head2 sub get_max_index
1479  
1480 max index = number of input variables -1
1481
1482 =cut
1483
1484 sub get_max_index {
1485 my ($self) = @_;
1486 my $max_index = 47;
1487  
1488 return($max_index);
1489 }
1490
1491
1492 1;