By default, the callback function has access only to the GD image resource as the $img argument, the pass-through argument provided when the callback function was registered, and additional arguments (if any) provided by PHPlot for the callback. It does not have access to the PHPlot class object instance, nor any of its contents.
If you feel you need access to the internals of the PHPlot class instance, you have two options. First, you can pass the instance variable as the $arg when registering the callback. With PHP5 this will pass a reference to the object, which allows reading and changing variables. (PHP4 would pass a copy of the object at the time the callback function is being set up, which would probably not be useful. There are work-arounds, but PHP4 is no longer supported.)
The second option is to use a class method. This is described in Section 9.4, “Object Methods as Callbacks”.
As stated in the warning at the top of this chapter, any access to the class internals is risky and subject to break with any new update to PHPlot.