pyglplot is a program to 3D-plot mathematical functions and datafiles. It is written as a module for python and as such features the full power and flexibility of the python programming language.

The graphics is implemented using OpenGL and the Gimp Toolkit for X11.



First, I want to present a screenshot how the pyglplot user interface looks like:
Here you see the user interface of pyglplot. It consists of a terminal where python is running, a main OpenGL window with a menu, a main control dialog to setup some global OpenGL parameters, and a so-called DataSet control dialog to set up options that are specific to the dataset. Also shown is the a color selection dialog that allows you to change the color of the wireframe grid of your plot.
You see pyglplot also runs on Mac OS X with Apple's X11. Plans for a native Aqua port do exist.

Now follow some saved plots from pyglplot:

The sinc(x)=sin(x)/x function plotted as a function of the modulus of the coordinates (x,y).
>>> plot(lambda x,y: 3*sinc(norm(x,y)), xrange=(-10,10), yrange=(-10,10))
The same plot with different background and wireframe color.
>>> plot(lambda x,y: 3*sinc(norm(x,y)), xrange=(-10,10), yrange=(-10,10))
The same function, plotted in polar coordinates.
>>> plot(lambda r,phi: 3*sinc(r), trans=Polar(), \
...   size=(49,49), xrange=(0,10), yrange=(0,2*math.pi))
The sinc plot again. A fully translucent surface (alpha=0.0) gives a pure wireframe plot.
Surface color is set to white and alpha to 1.0 -- we get a "remove hidden lines" effect.
The same plot again, but with an intermediate alpha of 0.7 gives some transparency.
A sphere. This demonstrates the capability of pyglplot to create parametrical plots.
>>> plot(lambda phi,theta: [2*math.sin(phi)*math.cos(theta), \
...     math.sin(phi)*math.sin(theta),math.cos(phi)], \
...   xrange=(0,math.pi), yrange=(0,2*math.pi), size=(49,49), \
...   parametric=True)



Contact the author.
Last update: Sat, 23 Jul 2005 18:31:13 +0200