CLASS ScatterPlot EXTENDS Plot
(Defined in: jpgraph_scatter.php : 131)
 ScatterPlot  Plot 
 ScatterPlot() 
 SetImpuls() 
 SetLinkPoints() 
 HideLegend() 
 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

 

 

function ScatterPlot($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);

 

 

function 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();

 

 

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

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

Example

$scatterplot->SetLinkPoints();