Chapter 12. Using PLplot from Python

NEEDS DOCUMENTATION, but here is the short story. We currently (February, 2001) have switched to dynamic loading of plplot following the generic method given in the python documentation. Most (???) of the PLplot common API has been implemented. (For a complete list see plmodules.c and plmodules2.c). With this dynamic method all the xw??.py examples work fine and should be consulted for the best way to use PLplot from python. You may have to set PYTHONPATH to the path where plmodule.so is located (or eventually installed). For more information see examples/python/README

pytkdemo and the x??.py examples it loads use the plframe widget. Thus, this method does not currently work under dynamic loading. They have only worked in the past using the static method with much hacking and rebuilding of python itself. We plan to try dynamic loading of all of PLplot (not just the plmodule.c and plmodule2.c wrappers) including plframe (or a python-variant of this widget) into python at some future date to see whether it is possible to get pytkdemo and the x??.py examples working under dynamic loading, but only the individual stand-alone xw??.py demos work at the moment.