From: Axel Freyn <freynaxe@us...>  20100925 10:10:33

Hi René. On Fri, Sep 24, 2010 at 05:20:02PM +0200, R. Bastian wrote: > Hello, > > I use graph.data.points to create graphs from numpy arrays. But it > seems that one gets a graph made of points. (the eps code shows lots > of "moveto") and not lines joining the values. > > Is there another way to go draw a line joining the values of a numpy > array ? Yes;) The Idea of PyX is:  you use "graph.data.points" as datasource  that has NOTHING to do with the question how the data are plottet (well, it gives a default value, but not more). See: http://pyx.sourceforge.net/manual/modulegraph.data.html  in the plotCommand, you can pass an additional plotStyle (from graph.style)  this defines, how the data are plotted. See: http://pyx.sourceforge.net/manual/modulegraph.style.html For example: g.plot(graph.data.points(dat),[graph.style.symbol()]) plots the data contained in the list "dat" using symbols In order to get lines, you could use: g.plot(graph.data.points(dat),[graph.style.line()]) You can also compine the styles, and add some parameters to define the styles more precisely. Look for example at: http://pyx.sourceforge.net/gallery/graphs/symbolline.html g.plot(data.function("y(x)=x*sin(x**2)"), [graph.style.line([style.linewidth.Thin, style.linestyle.solid]), graph.style.symbol(graph.style.symbol.circle, size=0.1, symbolattrs=[deco.filled([color.rgb.green]), deco.stroked([color.rgb.red])])]) This plots using the the datasource "data.function", with a quite complex style:  thin, solid, black line  circles of size 0.1, drawn with red lines and filled in green You can for example simply replace the "data.function(..)" in this command by your "graph.data.points(...) HTH, Axel 