- some bargraph examples
[PyX/mjg.git] / examples / bargraphs / minimal.py
blobf316662739af852885ed490a02f75401650ae01a
1 # For a minimal bar plot you have set an bar axis
2 # in the graph constructor and provide Xname column
3 # data (X stands for the bar axis to be used).
4 # Furthermore you need to specify the graph style,
5 # since the default graph styles symbol and function
6 # (depending on the data type) are not appropriate
7 # for this case.
9 from pyx import *
11 g = graph.graphxy(width=8, x=graph.axis.bar())
12 g.plot(graph.data.file("bar.dat", xname=0, y=2), [graph.style.bar()])
13 g.writeEPSfile("minimal")