SetPlotBorderType — Control how much of a border is drawn around the plot
$plot->SetPlotBorderType($pbt
)
SetPlotBorderType
controls how much of a border is
drawn around the plot. By default, left and right side borders are drawn.
$bt
A string or array indicating where to draw the plot borders. If a string, it must be one of the following values:
Value | Description |
---|---|
bottom | Border on bottom plot |
full | Border on all four sides of the plot |
left | Border on left side of plot |
none | No plot area border |
right | Border on right side of plot |
sides | Border on left and right sides of plot |
top | Border on top of plot |
An array of strings can be used. Each element in the array must be one of
the above values. For example, use either
array('left', 'right', 'bottom')
or array('sides', 'bottom')
to get a plot border on the sides and bottom but not the top.
Plot border color is set by SetGridColor (this color also applies to the axes and other elements). The default color is black.
The X and Y axis lines and the plot border are all drawn in the same color. Usually, the X axis line is drawn at the bottom of the plot area. Unless it is moved with SetXAxisPosition or because the plot contains negative Y data values, enabling or disabling the bottom plot border will have no visible effect because the axis line is drawn there.
Usually, the Y axis line is drawn on the left side of the plot area. Unless it is moved with SetYAxisPosition, enabling or disabling the left side plot border will have no visible effect because the axis line is drawn there.