Blame | Letzte Änderung | Log anzeigen | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1"><LINK REL="Start" HREF="index.html"><LINK REL="Contents" HREF="toc.html"><LINK REL="Prev" HREF="731Usinglineerrorplots.html"><LINK REL="Next" HREF="75Fieldplots.html"><STYLE TYPE="text/css"><!--BODY { font-family: serif }H1 { font-family: sans-serif }H2 { font-family: sans-serif }H3 { font-family: sans-serif }H4 { font-family: sans-serif }H5 { font-family: sans-serif }H6 { font-family: sans-serif }SUB { font-size: smaller }SUP { font-size: smaller }PRE { font-family: monospace }A { text-decoration: none }--></STYLE></HEAD><BODY><A HREF="toc.html">Contents</A><A HREF="731Usinglineerrorplots.html">Previous</A><A HREF="75Fieldplots.html">Next</A><HR NOSHADE><H2><A NAME="7_4">7.4 Scatter plots</A></H2><P> Scatter plots are very simple; they plot a number of pointsspecified by their X- and Y-coordinate. Each point is stroked on theimage with a mark as with line plots. The stroked marks can also beconnected with an optional line.<DIV class="note"><B>Note:</B> Eventhough it is only scatter plot that was designed to be used with X,Yplots it is perfectly possible to use use both X,Y coordinates for barand line plots as well.</DIV></P><P> Even though you would normally supply X-coordinates it is stillperfectly possible to use a text-scale for X-coordinates to justenumerate the points. This is especially useful when using the"Impulse" type of scatter plot as is shown below.</P><P> Scatter pots are created by including the jpgraph extension"jpgraph_scatter.php" and then creating an instance of plot type ofScatterPlot(). To specify the mark you want to use you access the markwith the instance variable "mark" in the scatter plot. The default isto use an unfilled small circle.</P><P> To create a scatter plot you will create an instance</P><P> A simple example using just default values will illustrate this</P><P><DIV class="example"><BR> <A href="exframes/frame_scatterex1.html" target="blank"><IMG border="0"HEIGHT="200" src="img/img/img/img/img/img/scatterex1.png" WIDTH="300"></A><BR><B>Figure 61:</B> The simplest possible scatter plot <A href="exframes/frame_scatterex1.html"target="blank">[src]</A> <P></P></DIV></P><P>We can easily adjust the size and colors for the markers to getanother effect as shown below<DIV class="example"><BR> <A href="exframes/frame_scatterex2.html" target="blank"><IMG border="0"HEIGHT="200" src="img/img/img/img/img/img/scatterex2.png" WIDTH="300"></A><BR><B>Figure 62:</B> The simplest possible scatter plot with adjustedmarks <A href="exframes/frame_scatterex2.html" target="blank">[src]</A> <P></P></DIV></P><P> Another possible variant of scatter plot is impulse-scatter plots.This is a variant of normal scatter plot where each mark have a linefrom the mark to the Y=0 base line. To change a scatter plot into animpulse scatter plot you have to call the method <A href="../ref/ScatterPlot.html#_SCATTERPLOT_SETIMPULS">SetImpuls()</A> on the scatter plot.</P><P> This type of plots are often used to illustrate signals inconjunction with digital signal processing. The following two examplesillustrates simple use of impulse plots.<DIV class="example"><BR> <A href="exframes/frame_impulsex1.html" target="blank"><IMG border="0"HEIGHT="200" src="img/img/img/img/img/img/impulsex1.png" WIDTH="300"></A><BR><B>Figure 63:</B> A simple impuls plot <A href="exframes/frame_impulsex1.html"target="blank">[src]</A> <P></P></DIV></P><P> The next example shows how to modify the color and width of theimpulse plot<DIV class="example"><BR> <A href="exframes/frame_impulsex2.html" target="blank"><IMG border="0"HEIGHT="200" src="img/img/img/img/img/img/impulsex2.png" WIDTH="300"></A><BR><B>Figure 64:</B> A modified impuls plot <A href="exframes/frame_impulsex2.html"target="blank">[src]</A> <P></P></DIV></P><P><DIV class="note"><B>Note:</B> You may draw impulse graphs withoutany mark by specifying the mark type as (-1) . That way only theimpulse lines will be drawn.</DIV></P><P> As a final touch we show two more advanced impulse graphs . In thesegraphs we have used more advanced formatting for the Y-axis labels aswell as adjusted the position of the axis position.<DIV class="example"><BR> <A href="exframes/frame_impulsex3.html" target="blank"><IMG border="0"HEIGHT="200" src="img/img/img/img/img/img/impulsex3.png" WIDTH="400"></A><BR><B>Figure 65:</B> In this imuplsplot we have adjusted the positionof the X-axis to the bottom and also added more decimals to the labelson the Y-axis <A href="exframes/frame_impulsex3.html" target="blank">[src]</A> <P></P></DIV></P><P><DIV class="example"><BR> <A href="exframes/frame_impulsex4.html" target="blank"><IMG border="0"HEIGHT="250" src="img/img/img/img/img/img/impulsex4.png" WIDTH="500"></A><BR><B>Figure 66:</B> In this impuls plot we have also added a lineplotwith a dotted line style. <A href="exframes/frame_impulsex4.html" target="blank">[src]</A> <P></P></DIV></P><P></P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="731Usinglineerrorplots.html">Previous</A><A HREF="75Fieldplots.html">Next</A></BODY></HTML>