PHPlot

PHPlot — Construct a new PHPlot Class Object

Synopsis

$plot &= new PHPlot([$width], [$height], [$output_file], [$input_file])
    

Description

This is the class constructor for PHPlot. It creates a new plot object and initializes all internal settings to default values.

The created object should always be assigned as a reference, so that the PHPlot destructor works properly.

Parameters

$width

Optional width of the plot image, in pixels. Default is 600.

$height

Optional height of the plot image, in pixels. Default is 400.

$output_file

Optional name of a file where the image output will be written. This is the same as using SetOutputFile. Default is no output file, meaning the image is written to standard output (that is, sent back to the browser).

$input_file

Optional name of a file to use as a starting image. This becomes the background for the plot. If an input_file is given, any width and height given to the constructor are ignored, and the size of the image in the named input_file are the plot image size. Default is no input file, meaning a blank image will be created at the given or default width and height.

Return Value

Returns an object, an instance of the PHPlot class. The return value should be assigned with the reference (&) operator as shown above.

Notes

The output_file will be ignored unless SetIsInline(True) is called.