2.2. Creating the Object
Prev | Chapter 2. Getting Started with PHPlot | Next

## 2.2. Creating the Object

You create a PHPlot object by first including the code to be used, and then defining the variable:

    <?php
    require_once 'phplot.php';  // here we include the PHPlot code
    $plot = new PHPlot;    // here we define the variable

    //Rest of code goes below

The above code assigns the PHPlot object to the variable `$plot`.

Prev | Up | Next
Chapter 2. Getting Started with PHPlot | Home | 2.3. A Simple Graph