CLASS PlotMark
(Defined in: jpgraph.php : 5712)
 PlotMark 
 Hide() 
 SetCallback() 
 SetColor() 
 SetFillColor() 
 SetSize() 
 SetType() 
 SetWidth() 
 Show() 
 

Class usage and Overview
In scatter plots and (possible) line plots each data point have a marker. This class implements these markers and the mtethod to modify it's apperance.

There are a number of possible marker, circle, filled circle, square, filled square, star, triangle and so on. See PlotMark::PlotMark() below for details on how to specify what mark.

Marks are accessed thtough the 'mark' property in line and scatter plot, i.e LinePlot::mark and ScatterPlot::mark. Marks in line plot are by default turned off. To enable marks use the construction $lineplot->mark->Show().

You can modify the type of plotmarks by calling the SetType() method. Possible plot marks are:

  1. MARK_SQUARE, A filled square
  2. MARK_UTRIANGLE, A triangle pointed upwards
  3. MARK_DTRIANGLE, A triangle pointed downwards
  4. MARK_DIAMOND, A diamond
  5. MARK_CIRCLE, A circle
  6. MARK_FILLEDCIRCLE, A filled circle
  7. MARK_CROSS, A cross
  8. MARK_STAR, A star
  9. MARK_X, An 'X'

 

See also related classes:
LinePlot and ScatterPlot

 


Class Methods

 

 

function Hide($aHide)
Hide plot mark

ArgumentDefaultDescription
$aHide true True=Hide plot mark

Description
Hide plot mark  
 
See also
PlotMark::Show

Example

$linerplot->mark->Hide();

 

 

function SetCallback($aFunc)

ArgumentDefaultDescription
$aFunc  No description available

Description
No description available.

 

 

function SetColor($aColor)
Specify color for plot mark

ArgumentDefaultDescription
$aColor  Color

Description
Specify the line color for plot mark  
 
See also
PlotMark::SetFillColor

Example

$lineplot->mark->SetColor('navy');

 

 

function SetFillColor($aFillColor)
Set fill color for mark

ArgumentDefaultDescription
$aFillColor  Color

Description
Set fill color for mark 
 
See also
PlotMark::SetColor

Example

$lineplot->mark->SetFillColor('blue');

 

 

function SetSize($aWidth)
Set size of mark

ArgumentDefaultDescription
$aWidth  WIdth of mark in pixels

Description
Synonym for SetWidth() 
 
See also
PlotMark::SetWidth

Example

$lineplot->mark->SetSize(10);

 

 

function SetType($aType)
Specify type of plot mark

ArgumentDefaultDescription
$aType  Type of plotmark

Description
The following plot marks are available
  1. MARK_SQUARE, A filled square
  2. MARK_UTRIANGLE, A triangle pointed upwards
  3. MARK_DTRIANGLE, A triangle pointed downwards
  4. MARK_DIAMOND, A diamond
  5. MARK_CIRCLE, A circle
  6. MARK_FILLEDCIRCLE, A filled circle
  7. MARK_CROSS, A cross
  8. MARK_STAR, A star
  9. MARK_X, An 'X'
 

Example

$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->Show();

 

 

function SetWidth($aWidth)
Set width of plot mark

ArgumentDefaultDescription
$aWidth  Width in pixels

Description
Set width of plot mark 

Example

$lineplot->mark->SetWidth(10);

 

 

function Show($aShow)
Enable or disable plotmarks

ArgumentDefaultDescription
$aShow true True=Show plot marks

Description
Enable or disable plotmarks. By default plot marks are not shown so if you want to display them you need to use this method.  

Example

$lineplot->mark->Show();