PyX — Example: bargraphs/

0.4 KB
13.5 KB
47.6 KB
20.3 KB

Stack bars on top of each other

from pyx import *

g = graph.graphxy(width=14, height=6,
g.plot("minimal.dat", xname=0, y=2, stack=3),


To stack bars on top of each other, you can add stackedbarpos styles and further bars to the list of styles. The stackbarpos need to get different column names each time to access the new stack data. This example also adds text styles to the bars, which just repeat the value column data here, but they could refer to other columns as well.