60 |
jpm |
1 |
<html>
|
|
|
2 |
<head>
|
|
|
3 |
<title>Documentation</title>
|
|
|
4 |
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
|
|
|
5 |
<link rel='stylesheet' href='style.css' />
|
|
|
6 |
</head>
|
|
|
7 |
|
|
|
8 |
<body>
|
|
|
9 |
<div align='center'>
|
|
|
10 |
<table cellpadding='0' cellspacing='0' id='contenu' class='round' style='width: 80%; margin-bottom: 20px'>
|
|
|
11 |
<tr>
|
|
|
12 |
<td class='borderhg'> </td>
|
|
|
13 |
<td class='borderh'> </td>
|
|
|
14 |
<td class='cornerhd'></td>
|
|
|
15 |
</tr>
|
|
|
16 |
<tr>
|
|
|
17 |
<td class='borderg'> </td>
|
|
|
18 |
<td><a id="top"></a><h2> Class ScatterPlot</h2><div class="extends"><ul>
|
|
|
19 |
<li><a href="Component.html">Component</a></li>
|
|
|
20 |
<ul>
|
|
|
21 |
<li><a href="Plot.html">Plot</a></li>
|
|
|
22 |
<ul><li>ScatterPlot <span class="interface">implements</span> <a href="Legendable.html">Legendable</a>
|
|
|
23 |
</li></ul>
|
|
|
24 |
</ul>
|
|
|
25 |
</ul></div><div class="description">
|
|
|
26 |
<p>
|
|
|
27 |
Les ScatterPlot (ou graphiques libres) permettent de dessiner des points aux coordonnées (x, y) sur une image.
|
|
|
28 |
Ce type de graphique est plus pluissant que les <a href="LinePlot.html">LinePlot</a> car plusieurs points de même abscisse peuvent être placés sur le même graphique.
|
|
|
29 |
</p>
|
|
|
30 |
</div><ul class="links"><li><a href="index.html">Retourner voir la liste de toutes les classes</a></li></ul><h2>Méthodes et propriétés</h2><ul class="properties">
|
|
|
31 |
<li>
|
|
|
32 |
<span class="access">public</span> <a href="Mark.html"><span class="type">Mark</span></a> <a href="ScatterPlot.html#property.mark"><span class="argument">$mark</span></a>
|
|
|
33 |
</li>
|
|
|
34 |
<li>
|
|
|
35 |
<span class="access">public</span> <a href="Label.html"><span class="type">Label</span></a> <a href="ScatterPlot.html#property.label"><span class="argument">$label</span></a>
|
|
|
36 |
</li>
|
|
|
37 |
</ul><ul class="methods">
|
|
|
38 |
<li>
|
|
|
39 |
<span class="access">public</span> <a href="ScatterPlot.html#method.__construct">__construct</a>(<span class="type">array</span> <span class="argument">$datay</span>, <span class="type">array</span> <span class="argument">$datax</span> := <span class="default">NULL</span>)
|
|
|
40 |
</li>
|
|
|
41 |
<li>
|
|
|
42 |
<span class="access">public</span> <a href="ScatterPlot.html#method.setImpulse">setImpulse</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
43 |
</li>
|
|
|
44 |
<li>
|
|
|
45 |
<span class="access">public</span> <a href="ScatterPlot.html#method.link">link</a>(<span class="type">bool</span> <span class="argument">$link</span>)
|
|
|
46 |
</li>
|
|
|
47 |
<li>
|
|
|
48 |
<span class="access">public</span> <a href="ScatterPlot.html#method.linkNull">linkNull</a>(<span class="type">bool</span> <span class="argument">$linkNull</span>)
|
|
|
49 |
</li>
|
|
|
50 |
<li>
|
|
|
51 |
<span class="access">public</span> <a href="ScatterPlot.html#method.setColor">setColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
52 |
</li>
|
|
|
53 |
<li>
|
|
|
54 |
<span class="access">public</span> <a href="ScatterPlot.html#method.setStyle">setStyle</a>(<span class="type">int</span> <span class="argument">$style</span>)
|
|
|
55 |
</li>
|
|
|
56 |
<li>
|
|
|
57 |
<span class="access">public</span> <a href="ScatterPlot.html#method.setThickness">setThickness</a>(<span class="type">int</span> <span class="argument">$thickness</span>)
|
|
|
58 |
</li>
|
|
|
59 |
</ul><h2>Documentation</h2><ul class="doc">
|
|
|
60 |
<li class="property">
|
|
|
61 |
<a id="property.mark"></a><span class="access">public</span> <a href="Mark.html"><span class="type">Mark</span></a> <a href="ScatterPlot.html#property.mark"><span class="argument">$mark</span></a><div class="description">
|
|
|
62 |
Représente les marques affichées sur chaque point.
|
|
|
63 |
</div>
|
|
|
64 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
65 |
</li>
|
|
|
66 |
<li class="property">
|
|
|
67 |
<a id="property.label"></a><span class="access">public</span> <a href="Label.html"><span class="type">Label</span></a> <a href="ScatterPlot.html#property.label"><span class="argument">$label</span></a><div class="description">
|
|
|
68 |
Représente les étiquettes affichées au-dessus de chaque point.
|
|
|
69 |
Ces étiquettes ne sont pas affichées par défaut.
|
|
|
70 |
</div>
|
|
|
71 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
72 |
</li>
|
|
|
73 |
<li class="method">
|
|
|
74 |
<a id="method.__construct"></a><span class="access">public</span> <a href="ScatterPlot.html#method.__construct">__construct</a>(<span class="type">array</span> <span class="argument">$datay</span>, <span class="type">array</span> <span class="argument">$datax</span> := <span class="default">NULL</span>)
|
|
|
75 |
<div class="description">
|
|
|
76 |
Créé un nouveau ScatterPlot avec des points d'abscisses $datax et d'ordonnées $datay.
|
|
|
77 |
Si la valeur $datax est laissée à NULL, alors la librairie utilisera des valeurs incrémentales pour X, en commençant par zéro.
|
|
|
78 |
<pre>
|
|
|
79 |
|
|
|
80 |
<?php
|
|
|
81 |
|
|
|
82 |
require_once "ScatterPlot.class.php";
|
|
|
83 |
|
|
|
84 |
$graph = new <a href="Graph.html">Graph</a>(400, 400);
|
|
|
85 |
|
|
|
86 |
// Tableaux de valeurs
|
|
|
87 |
$y = array(2, 4, 6);
|
|
|
88 |
$x = array(1, 4, 3);
|
|
|
89 |
|
|
|
90 |
// On dessine les points (1, 2), (4, 4) et (3, 6)
|
|
|
91 |
$plot = new <a href="ScatterPlot.html">ScatterPlot</a>($y, $x);
|
|
|
92 |
|
|
|
93 |
$graph-><a href="Graph.html#method.add">add</a>($plot);
|
|
|
94 |
$graph-><a href="Graph.html#method.draw">draw</a>();
|
|
|
95 |
|
|
|
96 |
?>
|
|
|
97 |
|
|
|
98 |
</pre>
|
|
|
99 |
</div>
|
|
|
100 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
101 |
</li>
|
|
|
102 |
<li class="method">
|
|
|
103 |
<a id="method.setImpulse"></a><span class="access">public</span> <a href="ScatterPlot.html#method.setImpulse">setImpulse</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
104 |
<div class="description">
|
|
|
105 |
Si vous appelez cette méthode, les points de la courbe seront reliés à l'axe des abscisses par des segments de droite verticaux de couleur $color.
|
|
|
106 |
Cette méthode permet notamment de représenter des graphiques à impulsions.
|
|
|
107 |
</div>
|
|
|
108 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
109 |
</li>
|
|
|
110 |
<li class="method">
|
|
|
111 |
<a id="method.link"></a><span class="access">public</span> <a href="ScatterPlot.html#method.link">link</a>(<span class="type">bool</span> <span class="argument">$link</span>)
|
|
|
112 |
<div class="description">
|
|
|
113 |
Permet de lier les points du graphique entre eux.
|
|
|
114 |
</div>
|
|
|
115 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
116 |
</li>
|
|
|
117 |
<li class="method">
|
|
|
118 |
<a id="method.linkNull"></a><span class="access">public</span> <a href="ScatterPlot.html#method.linkNull">linkNull</a>(<span class="type">bool</span> <span class="argument">$linkNull</span>)
|
|
|
119 |
<div class="description">
|
|
|
120 |
Si $linkNull vaut TRUE, alors les valeurs en ordonnée égales à nulles n'interrompront pas le lien entre tous les points.
|
|
|
121 |
A l'inverse, si $linkNull vaut FALSE, alors le lien sera rompu à chaque fois qu'une valeur égale à NULL sera trouvée.
|
|
|
122 |
Cette méthode n'a de sens que lorsque vous avez choisi de relier les points entre eux.
|
|
|
123 |
<div class="see">
|
|
|
124 |
Voir aussi :
|
|
|
125 |
<ul><li><a href="ScatterPlot.html#method.link">ScatterPlot::link()</a></li></ul>
|
|
|
126 |
</div>
|
|
|
127 |
</div>
|
|
|
128 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
129 |
</li>
|
|
|
130 |
<li class="method">
|
|
|
131 |
<a id="method.setColor"></a><span class="access">public</span> <a href="ScatterPlot.html#method.setColor">setColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
132 |
<div class="description">
|
|
|
133 |
Change la couleur de la ligne qui relie les points du composant entre eux.
|
|
|
134 |
</div>
|
|
|
135 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
136 |
</li>
|
|
|
137 |
<li class="method">
|
|
|
138 |
<a id="method.setStyle"></a><span class="access">public</span> <a href="ScatterPlot.html#method.setStyle">setStyle</a>(<span class="type">int</span> <span class="argument">$style</span>)
|
|
|
139 |
<div class="description">
|
|
|
140 |
Change le style de ligne (<a href="Line.html#constant.SOLID">Line::SOLID</a>, <a href="Line.html#constant.DOTTED">Line::DOTTED</a> ou <a href="Line.html#constant.DASHED">Line::DASHED</a>) qui relie chaque point.
|
|
|
141 |
</div>
|
|
|
142 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
143 |
</li>
|
|
|
144 |
<li class="method">
|
|
|
145 |
<a id="method.setThickness"></a><span class="access">public</span> <a href="ScatterPlot.html#method.setThickness">setThickness</a>(<span class="type">int</span> <span class="argument">$thickness</span>)
|
|
|
146 |
<div class="description">
|
|
|
147 |
Change l'épaisseur de la ligne qui relie les points du composant entre eux.
|
|
|
148 |
L'épaisseur de la ligne doit être toujours positive.
|
|
|
149 |
</div>
|
|
|
150 |
<div class="description-bottom"><a href="ScatterPlot.html#top">Remonter</a></div>
|
|
|
151 |
</li>
|
|
|
152 |
</ul>
|
|
|
153 |
</td>
|
|
|
154 |
<td class='borderd'> </td>
|
|
|
155 |
</tr>
|
|
|
156 |
<tr>
|
|
|
157 |
<td class='cornerbg'></td>
|
|
|
158 |
<td class='borderb'> </td>
|
|
|
159 |
<td class='cornerbd'></td>
|
|
|
160 |
</tr>
|
|
|
161 |
</table>
|
|
|
162 |
</div>
|
|
|
163 |
</body>
|
|
|
164 |
</html>
|