revis is an extension for Reinteract that allows the embedding of visvis plots. Visvis is a pure Python plotting library using OpenGL, allowing for fast 3D visualization. It is object oreinted but also provides a procedural interface, much like matplotlib. revis allows you to use either interface within Reinteract, in much the same way that refigure2 does with matplotlib.


Currently, revis is in a very preliminary state. Basic plotting routines work, but more complicated constructions are likely to fail. The goal is to support everything that visvis can do, but we're not close to that yet.

What's New


Initial release. This should be considered alpha-quality software; it is known to be buggy and crash.



Getting It

Download the single .py file. Place it in your ~/.reinteract/modules folder, which you may need to create. (It can also go in the reinteract/lib folder of your Reinteract installation, or somewhere else on your sys.path.)

revis is hosted at github, so if you want to hack it, you can clone the repository git://

revis requires a recent version of visvis; the most recent release (1.4) is too old. I recommend getting the current trunk. Since visvis is pure Python, you don't have to worry about building it; just put it somewhere where Python will find it.

Using It

Import the revis module. For interactive work, I find it much easier to import it into the current namespace. revis tries to avoid unnecessary namespace pollution.

from revis import *

You'll almost always want numpy as well:

from numpy import *

Single plotting commands can be given alone, to create simple plots:


Multiple pylab commands can be grouped together in a with block.

with figure() as f:
    title('Plot title')

The syntax is borrowed directly from refigure2. See those docs for more details. Like refigure2, revis can make use of the output patch to reduce the above to:

with figure():
    title('Plot title')

Known Issues

Bugs will be tracked on the github issue tracker.

You will need a very recent version of visvis in order for revis figures to receive modifier key information (Shift, Control, etc).

When creating the first figure of a session, revis does not know your OpenGL capabilities. Therefore, functions that adjust their behavior based on these capabilities (like volshow) will use their low-fi versions for the first figure (volshow2 instead of volshow3). You can get the hi-fi versions by re-executing the figure.

The various screenshot functions will only work after the figure has been created onscreen. Practially, this means they must come after the with block and not be executed at the same time. Hopefully, visvis will gain offscreen rendering capabilities and this can be fixed.

Robert Schroll, rschroll at gmail dot com