SetPlotBorderType — Control how much of a border is drawn around the plot




SetPlotBorderType controls how much of a border is drawn around the plot.



A string or array indicating where to draw the plot borders. If a string, it must be one of the following values:

bottomBorder on bottom plot
fullBorder on all four sides of the plot
leftBorder on left side of plot
noneNo plot area border
rightBorder on right side of plot
sidesBorder on left and right sides of plot
topBorder 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.


By default, left and right side borders are drawn for all plot types except pie charts. For pie charts, no borders are drawn by default.

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, and the Y axis line is drawn on the left side of the plot area. (See SetXAxisPosition and SetYAxisPosition for more information on the axis positions.) Enabling or disabling a plot border edge that corresponds to an axis line will have no visible effect because the axis line will be drawn there.

The preceding paragraph does not apply to pie charts, which do not have axis lines.


Through PHPlot-5.5.0, plot area borders were not available for pie charts, and the default border type was always 'sides'. Starting with PHPlot-5.6.0, pie charts can also have plot area borders. The default plot area border type is 'none' for pie charts, and 'sides' for all other plot types.

Through PHPlot-5.1.1, the available choices were 'left', 'sides', 'full', or 'none', and only a single string option was supported. Starting with PHPlot-5.1.2, the additional choices 'right', 'top', and 'bottom' were added, as well as the ability to pass an array of choices. Logo

This version of the manual was produced for the PHPlot Sourceforge project web service site, which requires the logo on each page.

To download a logo-free copy of the manual, see the PHPlot project downloads area.