SetPointShapes

SetPointShapes — Select a point shape for each data set

Synopsis

$plot->SetPointShapes($pt)
    

Description

SetPointShapes assigns a point shape to each data set in a plot. 'Point' here refers to the marker drawn at each data point in 'points' and 'linepoints' type plots. For example, if each data row contains 4 Y values, the first point shape will be used for the first Y value, the second point shape for the second Y value, etc. There are 10 point shapes to chose from.

Parameters

$pt

An array of point shape names, or a string naming a single point shape. If a string, that shape name is used for all data sets. If an array, the array values name the point shapes for each subsequent data set in a plot. The following shapes are available:

Shape NameDescription
circleA hollow circle centered on the point.
crossAn X centered on the point.
diamondA filled diamond (square rotated 45 degrees).
dotA filled circle centered on the point.
halflineA short line from the point going left.
lineA horizontal line centered on the point.
plusA plus sign centered on the point.
rectA filled square centered on the point.
triangleA filled triangle pointing down from the point.
trianglemidA filled triangle pointing down to the point.
noneNo marker (see notes).

See Example 5.7, “Line/Point Plot, Point Shapes” for a picture of the shapes.

Notes

If an array is used for $pt, it must use zero based sequential integer indexes. This is what the PHP manual calls 'the usual integer indices (starting from zero, increasing by one)'.

This applies only to 'points' and 'linepoints' plot types.

By default, all data sets use the diamond shape.

A point shape can be set to 'none' to suppress the point markers for that data set. This is only useful with 'linepoints' plot types, and results in a 'lines' plot type for that data set: a line only, but no markers. (This is available with PHPlot-5.0rc3 and higher.)