PHPlot Function Reference


Abstract

This part of the PHPlot Reference Manual contains the reference information for the PHPlot functions. Note that all the functions (except the class constructor) are implemented as methods of the class PHPlot, and are therefore called through an object which is an instance of the class. In this text, $plot is used to represent an instance of the PHPlot class.

Table of Contents

DrawGraph — Draw the current graph onto the image
GetCallback — Returns the current callback function registered for the given reason
PHPlot — Construct a new PHPlot Class Object
PrintImage — Output the generated graph image and clean up the internal storage space.
RemoveCallback — Unregisters any callback registered for the given reason
SetBackgroundColor — Sets the overall background color.
SetBgImage — Set a graphic file to be used in the graph background
SetBrowserCache — Control browser-side image caching
SetCallback — Registers a callback function
SetDataBorderColors — Set the rectangle border color on bars and stacked bars
SetDataColors — Set the colors for plotting data sets
SetDataType — Indicate the format of the data array
SetDataValues — Set the data array for plotting
SetDefaultDashedStyle — Sets the on/off pattern for dashed lines.
SetDefaultTTFont — Set the default TrueType font
SetDrawBrokenLines — Sets whether lines should be broken at missing data
SetDrawDashedGrid — Use solid or dashed lines for the grid
SetDrawPlotAreaBackground — Enables drawing of a plot area background color
SetDrawXDataLabelLines — Draw data lines
SetDrawXGrid — Whether or not to draw the X grid lines
SetDrawYDataLabelLines — Not implemented
SetDrawYGrid — Whether or not to draw the Y grid lines
SetErrorBarColors — Sets the colors used for data error bars
SetErrorBarLineWidth — Set the line width used for error bars
SetErrorBarShape — Select line or tee-style error bars
SetErrorBarSize — Set the size of the error bar tee.
SetFileFormat — Select the graphic image format generated by PHPlot
SetFont — Select which font to use for a plot element
SetGridColor — Set the color used for the axes and borders
SetImageBorderColor — Set image border color, if enabled
SetImageBorderType — Draw a border around the image
SetIsInline — Set the output image to be “inline” - without HTTP headers
SetLabelColor — Do not use
SetLabelScalePosition — Position pie-chart percentage labels
SetLegend — Add text to a legend box
SetLegendPixels — Position the legend on the image (device coordinates)
SetLegendStyle — Control the appearance of the legend
SetLegendWorld — Position the legend on the image (world coordinates)
SetLightGridColor — Set the color for grid lines
SetLineSpacing — Set spacing between lines of multi-line elements
SetLineStyles — Set the line style (solid or dashed) for each data set
SetLineWidths — Set line width (thickness) for each data set
SetMarginsPixels — Set margins around the plot area
SetNumberFormat — Set the separators used when formatting number labels
SetNumXTicks — Set the number of X tick marks
SetNumYTicks — Set the number of Y tick marks
SetOutputFile — Redirect PHPlot output to a file
SetPlotAreaBgImage — Set a graphic file to be used in the plot area background
SetPlotAreaPixels — Set the limits for the plot area in device coordinates
SetPlotAreaWorld — Override automatic data scaling to device coordinates
SetPlotBgColor — Set plot area background color
SetPlotBorderType — Control how much of a border is drawn around the plot
SetPlotType — Select the type of plot - how the data will be graphed
SetPointShapes — Select a point shape for each data set
SetPointSizes — Sets the point size for each data set
SetPrecisionX — Set precision for numeric formated X labels
SetPrecisionY — Set precision for numeric formated Y tick labels
SetPrintImage — Determine whether or not to automatically output the image when the plot is drawn
SetRGBArray — Select a color map
SetShading — Set the size of the drop shadow for bar and pie charts.
SetSkipBottomTick — Suppress the bottom Y axis tick mark and label
SetSkipLeftTick — Suppress the first X axis tick mark and label
SetSkipRightTick — Suppress the last X axis tick mark and label
SetSkipTopTick — Suppress the top Y axis tick mark and label
SetTTFPath — Set the name of the default TrueType font directory
SetTextColor — Set general text color
SetTickColor — Set the color of the axis tick marks
SetTitle — Set the main title text for the plot
SetTitleColor — Set the color of the plot titles
SetTransparentColor — Designate one color to be transparent
SetUseTTF — Enables or disables use of TrueType fonts
SetXAxisPosition — Move the X axis
SetXDataLabelPos — Where to draw the X data labels
SetXLabelAngle — Set the text angle for X tick and data labels
SetXLabelType — Set formatting type for X tick and data labels
SetXScaleType — Select linear or logarithmic scale
SetXTickCrossing — Set crossing length of X tick marks
SetXTickIncrement — Set the step between X ticks
SetXTickLabelPos — Position the X tick labels
SetXTickLength — Set outer length of X tick marks
SetXTickPos — Position the X axis tick marks
SetXTimeFormat — Set date/time formatting string for X labels
SetXTitle — Sets the X axis title, and optionally its position
SetYAxisPosition — Move the Y axis
SetYDataLabelPos — Position and control Y data labels
SetYLabelAngle — Set the text angle for Y tick labels
SetYLabelType — Set formatting type for Y tick and data labels
SetYScaleType — Select linear or logarithmic scale
SetYTickCrossing — Set crossing length of Y tick marks
SetYTickIncrement — Set the step between Y ticks
SetYTickLabelPos — Position the Y tick labels
SetYTickLength — Set outer length of Y tick marks
SetYTickPos — Position the Y axis tick marks
SetYTimeFormat — Set date/time formatting string for Y labels
SetYTitle — Sets the Y axis title, and optionally its position