| 1 |
lars |
1 |
<style type="text/css">
|
|
|
2 |
<!--
|
|
|
3 |
A:link {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
|
|
|
4 |
A:visited {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
|
|
|
5 |
A:hover {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: underline; color: #FF0000}
|
|
|
6 |
th {font-family: helvetica, arial; color : blue; font-size:85%; background : lightgrey; border-right:black solid 1pt; border-bottom:black solid 1pt;}
|
|
|
7 |
//-->
|
|
|
8 |
</style><hr><a name="_C_SCATTERPLOT"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>ScatterPlot</b> EXTENDS <a href="Plot .html#_C_PLOT " style="font-face:arial;font-weight:bold;">Plot </a></div>
|
|
|
9 |
<i>(Defined in: jpgraph_scatter.php : 130)</i><table border=1><tr><td> <a href="ScatterPlot.html" style="font-family:arial;font-weight:bold;color:darkblue;">ScatterPlot</a> </td><td> <a href="Plot .html" style="font-family:arial;font-weight:bold;color:darkblue;">Plot </a> </td></tr><tr><td valign=top> <a href="ScatterPlot.html#_SCATTERPLOT_SCATTERPLOT">ScatterPlot()</a> <br>
|
|
|
10 |
<a href="ScatterPlot.html#_SCATTERPLOT_SETIMPULS">SetImpuls()</a> <br>
|
|
|
11 |
<a href="ScatterPlot.html#_SCATTERPLOT_SETLINKPOINTS">SetLinkPoints()</a> <br>
|
|
|
12 |
</td><td valign=top> </td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>A scatter plto is used to display a number of points specified by (x,y) coordinates. To specify the apperance of points the 'mark' property has to be set. See PlotMark class for further details.
|
|
|
13 |
<p>
|
|
|
14 |
The marks can also be connected with lines by calling the method SetLinkPoints() <p>
|
|
|
15 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="LinePlot.html">LinePlot</a> and <a href="PlotMark.html">PlotMark</a> <p> <hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
|
|
|
16 |
<p> <p> <span style='font-size:110%;'><a name="_SCATTERPLOT_SCATTERPLOT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
17 |
function ScatterPlot($datay,$datax)</font>
|
|
|
18 |
</b></div></a></span>
|
|
|
19 |
|
|
|
20 |
<span style='font-family:arial;font-size:90%;'><i>Constructor</i></span><p>
|
|
|
21 |
|
|
|
22 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
23 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
24 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
25 |
$datay</font>
|
|
|
26 |
|
|
|
27 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Y-data array</td></tr>
|
|
|
28 |
|
|
|
29 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
30 |
$datax</font>
|
|
|
31 |
|
|
|
32 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
33 |
false</font>
|
|
|
34 |
</td><td>X-data array</td></tr>
|
|
|
35 |
</table>
|
|
|
36 |
|
|
|
37 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Create a new scatter plot <br>
|
|
|
38 |
|
|
|
39 |
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
|
40 |
$datax = array( ... );
<br />$datay = array( ... );
<br />$scatter = new ScatterPlot($datay,$datax);
<br /></font>
|
|
|
41 |
</span><br>
|
|
|
42 |
<p>
|
|
|
43 |
<p> <p> <span style='font-size:110%;'><a name="_SCATTERPLOT_SETIMPULS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
44 |
function SetImpuls($f)</font>
|
|
|
45 |
</b></div></a></span>
|
|
|
46 |
|
|
|
47 |
<span style='font-family:arial;font-size:90%;'><i>Specify impuls type of sctter plot</i></span><p>
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
51 |
|
|
|
52 |
$f</font>
|
|
|
53 |
|
|
|
54 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
55 |
true</font>
|
|
|
56 |
|
|
|
57 |
</table>
|
|
|
58 |
|
|
|
59 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>By specifying the impuls type each plot is linked to the X-axis by a line.
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
$scatterplot->SetImpuls();
<br /></font>
|
|
|
65 |
|
|
|
66 |
<p>
|
|
|
67 |
<p> <p> <span style='font-size:110%;'><a name="_SCATTERPLOT_SETLINKPOINTS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
68 |
function SetLinkPoints($aFlag,$aColor,$aWeight)</font>
|
|
|
69 |
</b></div></a></span>
|
|
|
70 |
|
|
|
71 |
<span style='font-family:arial;font-size:90%;'><i>Combine the scatter plot points with a line</i></span><p>
|
|
|
72 |
|
|
|
73 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
74 |
|
|
|
75 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
79 |
true</font>
|
|
|
80 |
</td><td>True=Link scatter points</td></tr>
|
|
|
81 |
|
|
|
82 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
83 |
$aColor</font>
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
"black"</font>
|
|
|
87 |
</td><td>Color of line</td></tr>
|
|
|
88 |
|
|
|
89 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
90 |
$aWeight</font>
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
1</font>
|
|
|
94 |
</td><td>Line width</td></tr>
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Link scatter plots with a line of specified color and width. <br>
|
|
|
98 |
|
|
|
99 |
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
|
100 |
|
|
|
101 |
</span><br>
|
|
|
102 |
|