PyPlotter - A Python/Jython Graph Plotting Package. Manual

Eckhart Arnold

1 Introduction
2 License
3 Screenshots
4 Quick Tutorial
    4.1 Example 1: Plotting a Graph
    4.2 Example 2: Plotting a simplex diagram
5 Reference
6 Implementing a new device driver for PyPlotter

4.2 Example 2: Plotting a simplex diagram

Here is a short code snipplet to demonstrate the use of a simplex diagram. For the sake of brevity, the actual population dynamical function is not contained. See file “” for the full program.

1:  from PyPlotter import tkGfx as GfxDriver
2:  from PyPlotter import Simplex
4:  gfx = GfxDriver.Window(title="Demand Game")   
5:  dynamicsFunction = lambda p: PopulationDynamics(p,DemandGame, 
6:                                                  e=0.0,noise=0.0)
7:  diagram = Simplex.Diagram(gfx, dynamicsFunction, "Demand Game",
8:                        "Demand 1/3", "Demand 2/3", "Demand 1/2")
10: gfx.waitUntilClosed()

In order to draw a simplex diagram, you need to instantiate class Simplex.Diagram (line 7) with a suitable population dynamical function. Class Simplex.Diagram is specifically designed for visualizing population dynamics. If you want to use simplex diagrams for another purpose, you should use the lower level class Simplex.Plotter instead. The simplex diagram will not be drawn, unless the show method of class Simplex.Diagram is called, as it is done in line 9 of this example.

t g+ f @