| 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_PLOTLINE"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>PlotLine</b></div>
|
|
|
9 |
<i>(Defined in: jpgraph.php : 5818)</i><table border=1><tr><td> <a href="PlotLine.html" style="font-family:arial;font-weight:bold;color:darkblue;">PlotLine</a> </td></tr><tr><td valign=top> <a href="PlotLine.html#_PLOTLINE_HIDELEGEND">HideLegend()</a> <br>
|
|
|
10 |
<a href="PlotLine.html#_PLOTLINE_PLOTLINE">PlotLine()</a> <br>
|
|
|
11 |
<a href="PlotLine.html#_PLOTLINE_SETCOLOR">SetColor()</a> <br>
|
|
|
12 |
<a href="PlotLine.html#_PLOTLINE_SETDIRECTION">SetDirection()</a> <br>
|
|
|
13 |
<a href="PlotLine.html#_PLOTLINE_SETLEGEND">SetLegend()</a> <br>
|
|
|
14 |
<a href="PlotLine.html#_PLOTLINE_SETPOSITION">SetPosition()</a> <br>
|
|
|
15 |
<a href="PlotLine.html#_PLOTLINE_SETWEIGHT">SetWeight()</a> <br>
|
|
|
16 |
</td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>A plot line represents a horizontal or vertical line in the plot at an arbitrary position. A plot line can be added to all X-Y types of plots/graphs. <p>
|
|
|
17 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="Graph.html">Graph</a> <p> <hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
|
|
|
18 |
<p> <p> <span style='font-size:110%;'><a name="_PLOTLINE_HIDELEGEND"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
19 |
function HideLegend($f)</font>
|
|
|
20 |
</b></div></a></span>
|
|
|
21 |
|
|
|
22 |
<span style='font-family:arial;font-size:90%;'><i>Hide legend</i></span><p>
|
|
|
23 |
|
|
|
24 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
25 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
26 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
27 |
$f</font>
|
|
|
28 |
|
|
|
29 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>True/False</td></tr>
|
|
|
30 |
</table>
|
|
|
31 |
|
|
|
32 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Hide legend <br>
|
|
|
33 |
<p>
|
|
|
34 |
<p> <p> <span style='font-size:110%;'><a name="_PLOTLINE_PLOTLINE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
35 |
function PlotLine($aDir,$aPos,$aColor,$aWeight)</font>
|
|
|
36 |
</b></div></a></span>
|
|
|
37 |
|
|
|
38 |
<span style='font-family:arial;font-size:90%;'><i>Construct a new plot line</i></span><p>
|
|
|
39 |
|
|
|
40 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
41 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
42 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
43 |
$aDir</font>
|
|
|
44 |
|
|
|
45 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
46 |
HORIZONTAL</font>
|
|
|
47 |
</td><td>Direction, HORIZONTAL or VERTICAL</td></tr>
|
|
|
48 |
|
|
|
49 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
50 |
$aPos</font>
|
|
|
51 |
|
|
|
52 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
53 |
0</font>
|
|
|
54 |
</td><td>Position</td></tr>
|
|
|
55 |
|
|
|
56 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
57 |
$aColor</font>
|
|
|
58 |
|
|
|
59 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
60 |
"black"</font>
|
|
|
61 |
</td><td>Color</td></tr>
|
|
|
62 |
|
|
|
63 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
64 |
$aWeight</font>
|
|
|
65 |
|
|
|
66 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
67 |
1</font>
|
|
|
68 |
</td><td>Line weight</td></tr>
|
|
|
69 |
</table>
|
|
|
70 |
|
|
|
71 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Create a new horizontal or vertical line in the graph at a specific position.
|
|
|
72 |
|
|
|
73 |
The graph can the be added to the graph with a call to the AddLine <br>
|
|
|
74 |
|
|
|
75 |
<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">
|
|
|
76 |
// Add mark graph with static lines
<br />$line = new PlotLine(HORIZONTAL,0,"black",2);
<br />$graph->AddLine($line);</font>
|
|
|
77 |
</span><br>
|
|
|
78 |
<p>
|
|
|
79 |
<p> <p> <span style='font-size:110%;'><a name="_PLOTLINE_SETCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
80 |
function SetColor($aColor)</font>
|
|
|
81 |
</b></div></a></span>
|
|
|
82 |
|
|
|
83 |
<span style='font-family:arial;font-size:90%;'><i>Specify color of line</i></span><p>
|
|
|
84 |
|
|
|
85 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
86 |
|
|
|
87 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
88 |
$aColor</font>
|
|
|
89 |
|
|
|
90 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Color</td></tr>
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set color for line.
|
|
|
94 |
|
|
|
95 |
Note. Colors can also be set in the creation of a PlotLine
|
|
|
96 |
|
|
|
97 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="PlotLine.html#_PLOTLINE_PLOTLINE">PlotLine::PlotLine</a>
|
|
|
98 |
<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">
|
|
|
99 |
$plotline->SetColor('red');
<br /></font>
|
|
|
100 |
</span><br>
|
|
|
101 |
<p>
|
|
|
102 |
<p> <p> <span style='font-size:110%;'><a name="_PLOTLINE_SETDIRECTION"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
103 |
function SetDirection($aDir)</font>
|
|
|
104 |
</b></div></a></span>
|
|
|
105 |
|
|
|
106 |
<span style='font-family:arial;font-size:90%;'><i>Specify direction of line</i></span><p>
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
110 |
|
|
|
111 |
$aDir</font>
|
|
|
112 |
|
|
|
113 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Direction, horizontal or vertical line</td></tr>
|
|
|
114 |
</table>
|
|
|
115 |
|
|
|
116 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify direction of line. Valid arguments are:
|
|
|
117 |
<ul>
|
|
|
118 |
|
|
|
119 |
<li> HORIZONTAL
|
|
|
120 |
</ul>
|
|
|
121 |
|
|
|
122 |
Note: Direction can also be specified in the creation of a plot line.
|
|
|
123 |
<br>
|
|
|
124 |
|
|
|
125 |
<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">
|
|
|
126 |
$plotline->SetDirection(VERTICAL);
<br />$plotline->SetColor('red');
<br />$graph->AddLine($plotline);</font>
|
|
|
127 |
</span><br>
|
|
|
128 |
<p>
|
|
|
129 |
<p> <p> <span style='font-size:110%;'><a name="_PLOTLINE_SETLEGEND"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
130 |
function SetLegend($aLegend,$aCSIM,$aCSIMAlt)</font>
|
|
|
131 |
</b></div></a></span>
|
|
|
132 |
|
|
|
133 |
<span style='font-family:arial;font-size:90%;'><i>Set legend text</i></span><p>
|
|
|
134 |
|
|
|
135 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
136 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
137 |
|
|
|
138 |
$aLegend</font>
|
|
|
139 |
|
|
|
140 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Legend text</td></tr>
|
|
|
141 |
|
|
|
142 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
143 |
$aCSIM</font>
|
|
|
144 |
|
|
|
145 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>CSIM target</td></tr>
|
|
|
146 |
|
|
|
147 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
148 |
$aCSIMAlt</font>
|
|
|
149 |
|
|
|
150 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>CSIM Alt text</td></tr>
|
|
|
151 |
|
|
|
152 |
|
|
|
153 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set legend text <br>
|
|
|
154 |
|
|
|
155 |
<p> <p> <span style='font-size:110%;'><a name="_PLOTLINE_SETPOSITION"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
156 |
function SetPosition($aScalePosition)</font>
|
|
|
157 |
|
|
|
158 |
|
|
|
159 |
<span style='font-family:arial;font-size:90%;'><i>Specify position for plot line</i></span><p>
|
|
|
160 |
|
|
|
161 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
162 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
163 |
|
|
|
164 |
$aScalePosition</font>
|
|
|
165 |
|
|
|
166 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Scale position</td></tr>
|
|
|
167 |
</table>
|
|
|
168 |
|
|
|
169 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify position for plot line. If the line is vertical the position is interpretated as the x-coordinate and if it is horizontal then the positoin is interpretatedas the Y-coordinate.
|
|
|
170 |
|
|
|
171 |
Note: Position can also be specified in the creation of the line. <br>
|
|
|
172 |
|
|
|
173 |
|
|
|
174 |
$plotline->SetDirection(HORIZONTAL);
<br />$plotline->SetPosition(25);
<br />$graph->AddLine($plotline);</font>
|
|
|
175 |
|
|
|
176 |
<p>
|
|
|
177 |
|
|
|
178 |
function SetWeight($aWeight)</font>
|
|
|
179 |
</b></div></a></span>
|
|
|
180 |
|
|
|
181 |
<span style='font-family:arial;font-size:90%;'><i>Specify line weight </i></span><p>
|
|
|
182 |
|
|
|
183 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
184 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
185 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
186 |
$aWeight</font>
|
|
|
187 |
|
|
|
188 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Line weight in pixels</td></tr>
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify line weight.
|
|
|
192 |
|
|
|
193 |
Note. Line weight can also be specified in the creation of the line.
|
|
|
194 |
|
|
|
195 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="PlotLine.html#_PLOTLINE_PLOTLINE">PlotLine::PlotLine</a>
|
|
|
196 |
<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">
|
|
|
197 |
|
|
|
198 |
</span><br>
|
|
|
199 |
|