CLASS PlotMark
(Defined in: jpgraph.php : 5712) 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:
- MARK_SQUARE, A filled square
- MARK_UTRIANGLE, A triangle pointed upwards
- MARK_DTRIANGLE, A triangle pointed downwards
- MARK_DIAMOND, A diamond
- MARK_CIRCLE, A circle
- MARK_FILLEDCIRCLE, A filled circle
- MARK_CROSS, A cross
- MARK_STAR, A star
- MARK_X, An 'X'
See also related classes:
LinePlot and ScatterPlot
Class Methods
function Hide($aHide)
Hide plot mark
Argument | Default | Description |
$aHide
|
true
| True=Hide plot mark |
Description
Hide plot mark
See also
PlotMark::Show
$linerplot->mark->Hide();
function SetCallback($aFunc)
Argument | Default | Description |
$aFunc
| | No description available |
Description
No description available.
function SetColor($aColor)
Specify color for plot mark
Argument | Default | Description |
$aColor
| | Color |
Description
Specify the line color for plot mark
See also
PlotMark::SetFillColor
$lineplot->mark->SetColor('navy');
function SetFillColor($aFillColor)
Set fill color for mark
Argument | Default | Description |
$aFillColor
| | Color |
Description
Set fill color for mark
See also
PlotMark::SetColor
$lineplot->mark->SetFillColor('blue');
function SetSize($aWidth)
Set size of mark
Argument | Default | Description |
$aWidth
| | WIdth of mark in pixels |
Description
Synonym for SetWidth()
See also
PlotMark::SetWidth
$lineplot->mark->SetSize(10);
function SetType($aType)
Specify type of plot mark
Argument | Default | Description |
$aType
| | Type of plotmark |
Description
The following plot marks are available
- MARK_SQUARE, A filled square
- MARK_UTRIANGLE, A triangle pointed upwards
- MARK_DTRIANGLE, A triangle pointed downwards
- MARK_DIAMOND, A diamond
- MARK_CIRCLE, A circle
- MARK_FILLEDCIRCLE, A filled circle
- MARK_CROSS, A cross
- MARK_STAR, A star
- MARK_X, An 'X'
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->Show();
function SetWidth($aWidth)
Set width of plot mark
Argument | Default | Description |
$aWidth
| | Width in pixels |
Description
Set width of plot mark
$lineplot->mark->SetWidth(10);
function Show($aShow)
Enable or disable plotmarks
Argument | Default | Description |
$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.
$lineplot->mark->Show();