Hi Sudheer,
On 07.01.04, Sudheer Phani wrote:
> Could any one help me with plot functions. The code for one of
> examples is like this
>
> g = graph.graphxy(width=8,y=graph.linaxis())
> r = random.Random()
> d = [(i, math.exp(0.8*i+r.random())) for i in range(1,10)]
> g.plot(graph.data(data.data(d)),x=0,y=1)
> g.writetofile("lissajous")
>
> I am looking for some help with the plot function. In the line
> g.plot(graph.data(data.data(d)),x=0,y=1) what does x=0 , y=1 signify.
>
> If these arguments are not given (g.plot(graph.data(data.data(d))), I am
> getting an exception it says incomplete axis specification
The x=0 says, that the first column should be the x coordiante, while
the y=0 says, that the second column is the y coordinate. If you make
plots with more axes, you can have x2, x3, etc as well. Certains
styles allow also for other names, like dx for x error bars in the
symbol style.
There is no (not yet) default when ommitting those specifications
needed to use the style. The symbol style needs an x and y value to be
used at a xy-graph. Thats the general concept ...
André
--
by _ _ _ Dr. André Wobst
/ \ \ / ) wobsta@..., http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX
(_/ \_)_/\_/ visit http://pyx.sourceforge.net/
|