PyPlotter - A Python/Jython Graph Plotting Package. Manual
|4 Quick Tutorial|
|6 Implementing a new device driver for PyPlotter|
Adapting PyPlotter to a new GUI enviroment or to a new output device is very easy. You only have to implement a class for the driver itself that is derived from Gfx.Driver and, optionally, also another very simple standardized window class to open an output window (or context) on your GUI or device. The latter class must be derived from class Gfx.Window.
The driver class must implement the following methods from its parent class Gfx.Drivers: __init__, resizedGfx, getSize, getResolution, setColor, setColor, setLineWidth, setLinePattern, setFillPattern, setFont, getTextSize, drawLine, fillPoly, writeStr. Overriding the other methods or adding further methods is optional and may lead to increased performance.
The window class must implement all methods of class Gfx.Window, that is: __init__, refresh, quit, waitUntilClosed.
The already implemented drivers in modules awtGfx, wxGfx, tkGfx, gtkGfx, qtGfx and psGfx may serve as examples for implementing new drivers.