Graph/Xmgrace/Axes.pm

filter: Statementstmt 100% 33 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 97.5% 39 / 40 CC 2 SCAR 2.5
CC
2
Cov
100%
print
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Graph/Xmgrace/Grace.pm ↑ Summary Graph.pm »
1 #
2 # Axes.pm contains options for the Axes
3 #
4 ## This software product is developed by Esmond Lee and David Moore,
5 ## and copyrighted(C) 1998 by the University of California, San Diego
6 ## (UCSD), with all rights reserved. UCSD administers the CAIDA grant,
7 ## NCR-9711092, under which part of this code was developed.
8 ##
9 ## There is no charge for this software. You can redistribute it and/or
10 ## modify it under the terms of the GNU General Public License, v. 2 dated
11 ## June 1991 which is incorporated by reference herein. This software is
12 ## distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS, OF MERCHANTABILITY
13 ## OR FITNESS FOR A PARTICULAR PURPOSE or that the use of it will not
14 ## infringe on any third party's intellectual property rights.
15 ##
16 ## You should have received a copy of the GNU GPL along with this program.
17 ##
18 ##
19 ## IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY
20 ## PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
21 ## DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS
22 ## SOFTWARE, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF
23 ## THE POSSIBILITY OF SUCH DAMAGE.
24 ##
25 ## THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE
26 ## UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
27 ## SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY
28 ## OF CALIFORNIA MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES
29 ## OF ANY KIND, EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED
30 ## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
31 ## PARTICULAR PURPOSE, OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE
32 ## ANY PATENT, TRADEMARK OR OTHER RIGHTS.
33 ##
34 ##
35 ## Contact: graph-dev@caida.org
36 ##
37 ##
38 # Included objects:
39 # 1) Chart::Graph::Xmgrace::Axes_Options
40 #
41  
42 4 $VERSION = 3.2;
43  
44 package Chart::Graph::Xmgrace::Axes;
45 4 @ISA = qw(Chart::Graph::Xmgrace::Axis_Option);
46 4 ▶use Chart::Graph::Xmgrace::Axis;
Subroutine BEGIN: called CC=1 SCAR=0.0
47 4 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49 3 ▶sub _init {
Subroutine _init: called CC=1 SCAR=0.0
50 3 my $self = shift;
51 3 $self->{print_order} = ["xaxes", "yaxes", "xaxis","yaxis",
52 "altxaxis","altyaxis"];
53 3 $self->{length} = 4;
54 $self->{options} = {
55 3 "xaxes" => new Chart::Graph::Xmgrace::Axes_Options("xaxes"),
56 "yaxes" => new Chart::Graph::Xmgrace::Axes_Options("yaxes"),
57 "xaxis" => new Chart::Graph::Xmgrace::Axis("xaxis"),
58 "yaxis" => new Chart::Graph::Xmgrace::Axis("yaxis"),
59 "altxaxis" => new Chart::Graph::Xmgrace::Axis("altxaxis"),
60 "altyaxis" => new Chart::Graph::Xmgrace::Axis("altyaxis"),
61 };
62
63 # by default, the alternate axes are off
64 3 $self->altxaxis->status("off");
65 3 $self->altxaxis->label_options->place(["0.000000","0.105000"]);
66 3 $self->altyaxis->status("off");
67 3 $self->altyaxis->label_options->place(["0.000000","0.105000"]);
68 }
69  
70 1 ▶sub print ($$$$ ) {
Subroutine print: called CC=2 SCAR=6.9
Pod undocumented
71 1 my $self = shift;
72 1 my ($handle) = @_;
73
74 1 foreach $option (@{ $self->{"print_order"} }) {
75 6 my $option_ref = $self->{"options"};
76
77 # call each objects own print function
78 6 $option_ref->{$option}->print($handle);
79 }
80 }
81  
82 package Chart::Graph::Xmgrace::Axes_Options;
83 4 @ISA = qw(Chart::Graph::Xmgrace::Base_Option);
84 4 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
85  
86 6 ▶sub _init {
Subroutine _init: called CC=1 SCAR=0.0
87 6 my $self = shift;
88 6 my $type_of_axes = shift; # xaxes, yaxes
89 6 $self->{name} = $type_of_axes;
90 6 $self->{print_order} = ["scale","invert"];
91 6 $self->{length} = 4;
92 $self->{options} = {
93 6 "scale" => "Normal", # Normal, Linear, Reciprocal
94 "invert" => "off",
95 };
96 }
97  
98 4 1;
« Graph/Xmgrace/Grace.pm ↑ Summary Graph.pm »