CLASS
ScatterPlot EXTENDS
Plot
(Defined in: jpgraph_scatter.php : 130) Class usage and Overview
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.
The marks can also be connected with lines by calling the method SetLinkPoints()
See also related classes:
LinePlot and PlotMark
Class Methods
function ScatterPlot($datay,$datax)
Constructor
Argument | Default | Description |
$datay
| | Y-data array |
$datax
|
false
| X-data array |
Description
Create a new scatter plot
$datax = array( ... );
$datay = array( ... );
$scatter = new ScatterPlot($datay,$datax);
function SetImpuls($f)
Specify impuls type of sctter plot
Argument | Default | Description |
$f
|
true
| True=Use impuls type |
Description
By specifying the impuls type each plot is linked to the X-axis by a line.
This type of plots is often used to illustrate signals in discrete time signal processing.
$scatterplot->SetImpuls();
function SetLinkPoints($aFlag,$aColor,$aWeight)
Combine the scatter plot points with a line
Argument | Default | Description |
$aFlag
|
true
| True=Link scatter points |
$aColor
|
"black"
| Color of line |
$aWeight
|
1
| Line width |
Description
Link scatter plots with a line of specified color and width.
$scatterplot->SetLinkPoints();