Class ScatterPlot Extends Plot
(Defined in: jpgraph_scatter.php : 133)
 
 ScatterPlot  Plot 
 SetImpuls() 
 SetLinkPoints() 
 SetStem() 
 __construct() 
 HideLegend() 
 PreScaleSetup() 
 SetCenter() 
 SetColor() 
 SetCSIMTargets() 
 SetLegend() 
 SetLineWeight() 
 

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

 

ScatterPlot ::
SetImpuls($f)
Specify impuls type of sctter plot

ArgumentDefaultDescription
$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. 

Example:

$scatterplot->SetImpuls();

 

ScatterPlot ::
SetLinkPoints($aFlag, $aColor, $aWeight, $aStyle)
Combine the scatter plot points with a line

ArgumentDefaultDescription
$aFlag true True=Link scatter points
$aColor "black" Color of line
$aWeight 1 Line width
$aStyle 'solid' No description available

Description:
Link scatter plots with a line of specified color and width. 

Example:

$scatterplot->SetLinkPoints();

 

ScatterPlot ::
SetStem($f)

ArgumentDefaultDescription
$f true No description available

Description:
No description available.

 

ScatterPlot ::
__construct($datay, $datax)
Constructor

ArgumentDefaultDescription
$datay  Y-data array
$datax false X-data array

Description:
Create a new scatter plot 

Example:

$datax = array( ... );
$datay = array( ... );
$scatter = new ScatterPlot($datay,$datax);