File: pareto.tex

package info (click to toggle)
libchart-perl 2.4.1-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,804 kB
  • ctags: 370
  • sloc: perl: 9,120; makefile: 532
file content (62 lines) | stat: -rwxr-xr-x 2,458 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%
% paretio.tex
%
\section{Chart::Pareto}
\name{Chart::Pareto}
\file{Pareto.pm}
\requires{Chart::Base, GD, Carp, FileHandle}
\begin{Description} 
\class{Pareto} is a subclass of class \class{Chart::Base}.
The class \class{Pareto} creates a pare-to chart. 
Pareto plots only one dataset and its labels.
\end{Description}

\parindent 0pt{\large Example:}

\begin{figure}[h]
	\begin{center}
		\includegraphics[scale=0.7]{d_pareto2.png}
	\end{center}
	\caption{Pare-to chart}
	\label{fig:pareto}
\end{figure}
\begin{verbatim}
use Chart::Pareto;

$g = Chart::Pareto->new(500,400);
$g->add_dataset ('1st week', '2nd week', '3rd week', '4th week', '5th week',
                 '6th week', '7th week', '8th week', '9th week', '10th week');
$g->add_dataset (37, 15, 9 , 4, 3.5,
                  2.1, 1.2, 1.5, 6.2, 16);

%hash =( 'colors' => { 'dataset0' => 'mauve',
                       'dataset1' => 'light_blue',
                       'title' => 'orange'},
         'title' => 'Visitors at the Picasso Exhibition',
         'integer_ticks_only' => 'true',
         'skip_int_ticks' => 5,
         'grey_background' => 'false',
         'max_val' => 100,
         'y_label' => 'Visitors in Thousands',
         'x_ticks' => 'vertical',
 	       'spaced_bars' => 'true',
         'legend' => 'none'
        );
	
$g->set (%hash); 
$g->png ("pareto.png");
\end{verbatim}
\herv{Constructor:} An instance of a pare-to chart object can be created with the constructor new():\\
\fett{\$obj = Chart::Pareto->new();}\\
\fett{\$obj = Chart::Pareto->new(\kursiv{width}, \kursiv{height});}\\
\\
If \fett{new} has no arguments, the constructor returns an image with the size 300x400 pixels. If new has two arguments \kursiv{width} and \kursiv{height}, it returns an image with the desired size. \\ 
\\ 
\herv{Methods:}All universally valid methods, see page \pageref{methods}: Chart::Base. \\
\\
\herv{Attributes/Options:} All universally valid options, see page \pageref{options}. Also available, these special options:
\begin{description}
\item['y\_axes'] Tells chart where to place the y-axis. Valid values are 'left', 'right' and 'both'. Defaults to 'left'.
\item['spaced\_bars']Leaves space between bars at each data point when set to 'true'.  This just makes it easier to read a bar chart.  Default is 'true'.
\item['sort']Sorts the data descending if set to 'true'. Defaults to 'false'.  
\end{description}