CLASS PlotBand
(Defined in: jpgraph_plotband.php : 542)
 PlotBand 
 PlotBand() 
 SetDensity() 
 SetOrder() 
 ShowFrame() 
 

Class usage and Overview
A "Plotband" repesent a rectangualr area in the graph that can be given a specific pattern ranging from 3D grid to simple horizntal grid lines.

A Plot band is then added to the graph via the Graph::AddBand() method.

 

See also related classes:
Graph

 


Class Methods

 

 

function PlotBand($aDir,$aPattern,$aMin,$aMax,$aColor,$aWeight,$aDepth)
Create a new Plot band of the specified type

ArgumentDefaultDescription
$aDir  Direction of plot band
$aPattern  Type of pattern
$aMin  Min value for plot area
$aMax  Max value for plot area
$aColor "black" Color of pattern
$aWeight 1 Line weight
$aDepth DEPTH_BACK Depth. Over or under the plot.

Description
Create a new Plot band that later on can be added to the graph. The following pattern types are supported A plotband extends completely along one of the axis in the graph. This axis is determined by the first argument, the direction. Valid directions are
  1. HORIZONTAL
  2. VERTICAL
 

Example

$uband=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green");
$uband->ShowFrame(false);
$uband->SetDensity(50); // 50% line density
$lband=new PlotBand(HORIZONTAL,BAND_LDIAG,"min",0,"red");
$lband->ShowFrame(false);
$lband->SetDensity(20); // 20% line density

$graph->AddBand($uband);
$graph->AddBand($lband);

 

 

function SetDensity($aDens)
Specify density for pattern

ArgumentDefaultDescription
$aDens  Density [1,100]

Description
Specify density for pattern as an integer value between 1 and 100, 100 being very dense and 1 being very sparse.  

Example

$uband=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green");
$uband->ShowFrame(false);
$uband->SetDensity(50); // 50% line density
$lband=new PlotBand(HORIZONTAL,BAND_LDIAG,"min",0,"red");
$lband->ShowFrame(false);
$lband->SetDensity(20); // 20% line density

$graph->AddBand($uband);
$graph->AddBand($lband);

 

 

function SetOrder($aDepth)
Specify z-order parameter for plot

ArgumentDefaultDescription
$aDepth  Pattern Z-order parameter

Description
Specify if the pattern should be in front of plot or behind the plot. Valid parameters are  

Example

$band=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green");
$band->ShowFrame(false);
$band->SetOrder(DEPTH_BACK);
$graph->AddBand($band);

 

 

function ShowFrame($aFlag)
Display frame around pattern

ArgumentDefaultDescription
$aFlag true True=Display border

Description
Display frame around pattern 

Example

$band=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green");
$band->ShowFrame(false);
$band->SetOrder(DEPTH_BACK);
$graph->AddBand($band);