Hi,
On 26.01.05, Joerg Lehmann wrote:
> On 26.01.05, Simson L. Garfinkel wrote:
> > I think that you misunderstood my comment. I would much rather use PyX than
> > Gnuplot.
> >
> > But how do I do labeled pen traces within the plot, the way Gnuplot does? I
> > can't figure that out.
First, I'm really sorry about my crude comment. Still, we're not
developing gnuplot. Things are not always as easy as gnuplot tries to
make them ...
> I think it is not clear to us (at least to me) what you meant with
> labeled pen traces. Are you talking about a graph key like the one
> in the graphis/piaxis example (see
> http://pyx.sourceforge.net/examples/graphs/index.html)
I guess as well that your question is about graph keys. All you need
to do is to add a key instance to the graph constructor. For example:
import random
from pyx import *
g = graph.graphxy(width=10, key=graph.key.key())
g.plot([graph.data.list([(j, random.random()) for j in range(20)], x=1, y=2)
for k in range(3)],
[graph.style.line()])
g.writeEPSfile("minimal")
André
--
by _ _ _ Dr. André Wobst
/ \ \ / ) wobsta@..., http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX
(_/ \_)_/\_/ visit http://pyx.sourceforge.net/
|