Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
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="831Usinglineerrorplots.html">
8
<LINK REL="Next" HREF="85Fieldplots.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="831Usinglineerrorplots.html">Previous</A>
26
<A HREF="85Fieldplots.html">Next</A>
27
<HR NOSHADE>
28
<H2><A NAME="8_4">8.4 Scatter plots</A></H2>
29
<P> Scatter plots are very simple; they plot a number of points
30
 specified by their X- and Y-coordinate. Each point is stroked on the
31
 image with a mark as with line plots. The stroked marks can also be
32
 connected with an optional line.<DIV class="note"><B>Note:</B> Even
33
 though it is only scatter plot that was designed to be used with X,Y
34
 plots it is perfectly possible to use use both X,Y coordinates for bar
35
 and line plots as well.</DIV></P>
36
<P> Even though you would normally supply X-coordinates it is still
37
 perfectly possible to use a text-scale for X-coordinates to just
38
 enumerate the points. This is especially useful when using the
39
 &quot;Impulse&quot; type of scatter plot as is shown below.</P>
40
<P> Scatter pots are created by including the jpgraph extension
41
 &quot;jpgraph_scatter.php&quot; and then creating an instance of plot type of
42
 ScatterPlot(). To specify the mark you want to use you access the mark
43
 with the instance variable &quot;mark&quot; in the scatter plot. The default is
44
 to use an unfilled small circle.</P>
45
<P> To create a scatter plot you will create an instance</P>
46
<P> A simple example using just default values will illustrate this</P>
47
<P><DIV class="example">
48
<BR> <A href="exframes/frame_scatterex1.html" target="blank"><IMG border="0"
49
HEIGHT="200"  src="img/scatterex1.png" WIDTH="300"></A>
50
<BR><B>Figure 57:</B> The simplest possible scatter plot <A href="exframes/frame_scatterex1.html"
51
target="blank">[src]</A>&nbsp;
52
<P></P>
53
</DIV></P>
54
<P>We can easily adjust the size and colors for the markers to get
55
 another effect as shown below<DIV class="example">
56
<BR> <A href="exframes/frame_scatterex2.html" target="blank"><IMG border="0"
57
HEIGHT="200"  src="img/scatterex2.png" WIDTH="300"></A>
58
<BR><B>Figure 58:</B> The simplest possible scatter plot with adjusted
59
 marks <A href="exframes/frame_scatterex2.html" target="blank">[src]</A>
60
&nbsp;
61
<P></P>
62
</DIV></P>
63
<P> Another possible variant of scatter plot is impulse-scatter plots.
64
 This is a variant of normal scatter plot where each mark have a line
65
 from the mark to the Y=0 base line. To change a scatter plot into an
66
 impulse scatter plot you have to call the method <A href="../ref/ScatterPlot.html#_SCATTERPLOT_SETIMPULS">
67
 SetImpuls()</A> on the scatter plot.</P>
68
<P> This type of plots are often used to illustrate signals in
69
 conjunction with digital signal processing. The following two examples
70
 illustrates simple use of impulse plots.<DIV class="example">
71
<BR> <A href="exframes/frame_impulsex1.html" target="blank"><IMG border="0"
72
HEIGHT="200"  src="img/impulsex1.png" WIDTH="300"></A>
73
<BR><B>Figure 59:</B> A simple impuls plot <A href="exframes/frame_impulsex1.html"
74
target="blank">[src]</A>&nbsp;
75
<P></P>
76
</DIV></P>
77
<P> The next example shows how to modify the color and width of the
78
 impulse plot<DIV class="example">
79
<BR> <A href="exframes/frame_impulsex2.html" target="blank"><IMG border="0"
80
HEIGHT="200"  src="img/impulsex2.png" WIDTH="300"></A>
81
<BR><B>Figure 60:</B> A modified impuls plot <A href="exframes/frame_impulsex2.html"
82
target="blank">[src]</A>&nbsp;
83
<P></P>
84
</DIV></P>
85
<P><DIV class="note"><B>Note:</B> You may draw impulse graphs without
86
 any mark by specifying the mark type as (-1) . That way only the
87
 impulse lines will be drawn.</DIV></P>
88
<P> As a final touch we show two more advanced impulse graphs . In these
89
 graphs we have used more advanced formatting for the Y-axis labels as
90
 well as adjusted the position of the axis position.<DIV class="example">
91
<BR> <A href="exframes/frame_impulsex3.html" target="blank"><IMG border="0"
92
HEIGHT="200"  src="img/impulsex3.png" WIDTH="400"></A>
93
<BR><B>Figure 61:</B> In this imuplsplot we have adjusted the position
94
 of the X-axis to the bottom and also added more decimals to the labels
95
 on the Y-axis <A href="exframes/frame_impulsex3.html" target="blank">
96
[src]</A>&nbsp;
97
<P></P>
98
</DIV></P>
99
<P><DIV class="example">
100
<BR> <A href="exframes/frame_impulsex4.html" target="blank"><IMG border="0"
101
HEIGHT="250"  src="img/impulsex4.png" WIDTH="500"></A>
102
<BR><B>Figure 62:</B> In this impuls plot we have also added a lineplot
103
 with a dotted line style. <A href="exframes/frame_impulsex4.html" target="blank">
104
[src]</A>&nbsp;
105
<P></P>
106
</DIV></P>
107
<P></P>
108
<HR NOSHADE>
109
<A HREF="toc.html">Contents</A>
110
<A HREF="831Usinglineerrorplots.html">Previous</A>
111
<A HREF="85Fieldplots.html">Next</A>
112
</BODY>
113
</HTML>