File: mountain.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 (61 lines) | stat: -rwxr-xr-x 1,731 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
%
% mountain.tex
%
\section{Chart::Mountain}
\name{Chart::Mountain}
\file{Mountain.pm}
\requires{Chart::Base, GD, Carp, FileHandle}
\begin{Description} 
\class{Mountain} is a subclass of Chart::Base.
The class Mountain creates a mountain chart.
\end{Description}

\parindent 0pt{\large Example:}
\begin{figure}[h]
	\begin{center}
		\includegraphics[scale =0.6]{mountain.png}
	\end{center}
	\caption{Mountain chart}
	\label{fig:mountain}
\end{figure}
\begin{verbatim}
use Chart::Mountain;

$g = Chart::Mountain->new();

@data = [ [1910, 1930, 1950, 1970],
          [1, 3, 4, 2],
          [2, 4, 3, 3],
          [0.5, 1, 2, 1]];

$g->set('title' => 'Mountain Chart',
        'grid_lines' => 'false',
        'precision' => 1);

$g->png("mountain.png", @data);
\end{verbatim}

\begin{Constructor} 
An instance of a mountain chart object can be created with the constructor \textit{new()}:
\begin{quote}
\fett{\$obj = Chart::Mountain->new();}\\
\fett{\$obj = Chart::Mountain->new(\kursiv{width}, \kursiv{height});}
\end{quote}
If \textit{new()} has no arguments, 
the constructor returns an image with the size 300x400 pixels. If \textit{new()} 
has two arguments \parameter{width} and \parameter{height}, 
it returns an image with the desired size.
\end{Constructor}


\Methods
\method{All universal valid methods, see page \pageref{methods}
of \class{Chart::Base}.} \\[\parabstand]
%
\Attributes
All universal 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'.
\end{description}