| 1 |
lars |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
|
2 |
<HTML>
|
|
|
3 |
<HEAD>
|
|
|
4 |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
|
|
5 |
<LINK REL="Start" HREF="index.html">
|
|
|
6 |
<LINK REL="Contents" HREF="toc.html">
|
|
|
7 |
<LINK REL="Prev" HREF="73Errorplots.html">
|
|
|
8 |
<LINK REL="Next" HREF="74Scatterplots.html">
|
|
|
9 |
<STYLE TYPE="text/css"><!--
|
|
|
10 |
BODY { font-family: serif }
|
|
|
11 |
H1 { font-family: sans-serif }
|
|
|
12 |
H2 { font-family: sans-serif }
|
|
|
13 |
H3 { font-family: sans-serif }
|
|
|
14 |
H4 { font-family: sans-serif }
|
|
|
15 |
H5 { font-family: sans-serif }
|
|
|
16 |
H6 { font-family: sans-serif }
|
|
|
17 |
SUB { font-size: smaller }
|
|
|
18 |
SUP { font-size: smaller }
|
|
|
19 |
PRE { font-family: monospace }
|
|
|
20 |
A { text-decoration: none }
|
|
|
21 |
--></STYLE>
|
|
|
22 |
</HEAD>
|
|
|
23 |
<BODY>
|
|
|
24 |
<A HREF="toc.html">Contents</A>
|
|
|
25 |
<A HREF="73Errorplots.html">Previous</A>
|
|
|
26 |
<A HREF="74Scatterplots.html">Next</A>
|
|
|
27 |
<HR NOSHADE>
|
|
|
28 |
<H3><A NAME="7_3_1">7.3.1 Using line error plots</A></H3>
|
|
|
29 |
<P> A line error plot is an error plot with the addition that a line is
|
|
|
30 |
drawn between the average value of each error pair. You use this type
|
|
|
31 |
of plot the exact same way you would use an error plot. The only change
|
|
|
32 |
is that you must instantiated an <A href="../ref/ErrorPlot.html#_C_ERRORPLOT">
|
|
|
33 |
ErrorLinePlot()</A> instead and make sure you have included the
|
|
|
34 |
"jpgraph_line.php" since the line error plot makes use of the line plot
|
|
|
35 |
class to stroke the line.</P>
|
|
|
36 |
<P> To control the various properties of the line drawn the "line"
|
|
|
37 |
property of the error line plot may be accessed. So, for example, if
|
|
|
38 |
you want the line to be 2 pixels wide and blue you would have to add
|
|
|
39 |
the following two lines<DIV class="phpscript"><CODE><FONT color="#000000">
|
|
|
40 |
<FONT color="#0000BB"> $elplot</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
41 |
color="#0000BB">line</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
42 |
SetWeight</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">2</FONT><FONT
|
|
|
43 |
color="#007700">);
|
|
|
44 |
<BR></FONT><FONT color="#0000BB">$elplot</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
45 |
color="#0000BB">line</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
46 |
SetColor</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">
|
|
|
47 |
"blue"</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT>
|
|
|
48 |
</FONT></CODE></DIV></P>
|
|
|
49 |
<P>to generate the graph as shown below<DIV class="example">
|
|
|
50 |
<BR> <A href="exframes/frame_example15.html" target="blank"><IMG border="0"
|
|
|
51 |
HEIGHT="200" src="img/img/img/img/img/img/example15.png" WIDTH="300"></A>
|
|
|
52 |
<BR><B>Figure 59:</B> Linear error plot <A href="exframes/frame_example15.html"
|
|
|
53 |
target="blank">[src]</A>
|
|
|
54 |
<P></P>
|
|
|
55 |
</DIV></P>
|
|
|
56 |
<P> You may of course add legends to none, one or both of the line types
|
|
|
57 |
in the above graph. So for example if we wanted the legend "Min/Max"
|
|
|
58 |
for the red error bars and a legend "Average" for the blue line you
|
|
|
59 |
would have to add the lines<DIV class="phpscript"><CODE><FONT color="#000000">
|
|
|
60 |
<FONT color="#0000BB"> $errplot</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
61 |
color="#0000BB">SetLegend</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">
|
|
|
62 |
"Min/Max"</FONT><FONT color="#007700">);
|
|
|
63 |
<BR></FONT><FONT color="#0000BB">$errplot</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
64 |
color="#0000BB">line</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
65 |
SetLegend</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">
|
|
|
66 |
"Average"</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT>
|
|
|
67 |
</FONT></CODE></DIV></P>
|
|
|
68 |
<P> The resulting graph will now look like (note that we are using the
|
|
|
69 |
default placement of the legend box)<DIV class="example">
|
|
|
70 |
<BR> <A href="exframes/frame_example16.html" target="blank"><IMG border="0"
|
|
|
71 |
HEIGHT="200" src="img/img/img/img/img/img/example16.png" WIDTH="300"></A>
|
|
|
72 |
<BR><B>Figure 60:</B> Addding a legend box to the line error plot. <A href="exframes/frame_example16.html"
|
|
|
73 |
target="blank">[src]</A>
|
|
|
74 |
<P></P>
|
|
|
75 |
</DIV></P>
|
|
|
76 |
<P></P>
|
|
|
77 |
<HR NOSHADE>
|
|
|
78 |
<A HREF="toc.html">Contents</A>
|
|
|
79 |
<A HREF="73Errorplots.html">Previous</A>
|
|
|
80 |
<A HREF="74Scatterplots.html">Next</A>
|
|
|
81 |
</BODY>
|
|
|
82 |
</HTML>
|