## Re: [PyX-user] Changecircle and friends.

 Re: [PyX-user] Changecircle and friends. From: Andrea Riciputi - 2004-12-03 09:53:30 ```And indeed your example works as it is, but fails if I add a third data=20= series, such as: data =3D [[(1, 1), (2, 2), (3, 3)], [(1, 1), (2, 4), (3, 9)], [(1, 2),=20= (2, 3), (3, 4)]] It seems quite strange! Andrea. On 3 Dec 2004, at 10:16, Joerg Lehmann wrote: > Hi, > > On 03.12.04, Andrea Riciputi wrote: >> I'm struggling with changecircle and friends but, despite the fact=20 >> I've >> read the manual and studied somewhat the code, I can't understad how >> they work and how I use them in my PyX scripts. >> >> Suppose I have the following datas structure: >> >> data =3D [[first data series],[second data series], ...] >> >> where each data series is a 2-dim list (such as [x0,y0],[x1,y1],...). >> I've tried to use changecircle in the following way: >> >> h =3D pyx.graph.graphxy(blah, blah, blah...) >> h.plot([pyx.graph.data.list(data[i], x=3D1, y=3D2) for i in >> range(len(data))], [pyx.graph.style.symbol(symbol =3D >> pyx.graph.style.symbol.changecircle)]) > > The following example works for me with PyX 0.7: > > #!/usr/bin/env python > from pyx import * > > data =3D [ [ (1, 1), (2, 2), (3, 3) ], [ (1, 1), (2, 4), (3, 9)] ] > > g =3D graph.graphxy(width=3D10) > > g.plot([graph.data.list(date, x=3D1, y=3D2) for date in data], > [graph.style.symbol(symbol=3Dgraph.style.symbol.changecircle)]) > > g.writeEPSfile("test") > > [ Btw: Please always send a complete example to show that something=20 > doesn't > work as it should. This way it's much easier for others to test it. ] > > J=F6rg > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real=20 > users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > PyX-user mailing list > PyX-user@... > https://lists.sourceforge.net/lists/listinfo/pyx-user > ```

 [PyX-user] Changecircle and friends. From: Andrea Riciputi - 2004-12-03 08:59:03 ```Hi there, I'm struggling with changecircle and friends but, despite the fact I've read the manual and studied somewhat the code, I can't understad how they work and how I use them in my PyX scripts. Suppose I have the following datas structure: data = [[first data series],[second data series], ...] where each data series is a 2-dim list (such as [x0,y0],[x1,y1],...). I've tried to use changecircle in the following way: h = pyx.graph.graphxy(blah, blah, blah...) h.plot([pyx.graph.data.list(data[i], x=1, y=2) for i in range(len(data))], [pyx.graph.style.symbol(symbol = pyx.graph.style.symbol.changecircle)]) to get each series with a different symbol starting with a circle (it's the use that changecircle is intedend for, isn't it?), but when I try to write the eps file I get this error message: > AttributeError: changelist instance has no __call__ method Could you show me where my error is? Could you provide some pratical examples that can make me get the point? Sorry for my stupidity, Andrea. ```
 Re: [PyX-user] Changecircle and friends. From: Joerg Lehmann - 2004-12-03 09:17:03 ```Hi, On 03.12.04, Andrea Riciputi wrote: > I'm struggling with changecircle and friends but, despite the fact I've > read the manual and studied somewhat the code, I can't understad how > they work and how I use them in my PyX scripts. > > Suppose I have the following datas structure: > > data = [[first data series],[second data series], ...] > > where each data series is a 2-dim list (such as [x0,y0],[x1,y1],...). > I've tried to use changecircle in the following way: > > h = pyx.graph.graphxy(blah, blah, blah...) > h.plot([pyx.graph.data.list(data[i], x=1, y=2) for i in > range(len(data))], [pyx.graph.style.symbol(symbol = > pyx.graph.style.symbol.changecircle)]) The following example works for me with PyX 0.7: #!/usr/bin/env python from pyx import * data = [ [ (1, 1), (2, 2), (3, 3) ], [ (1, 1), (2, 4), (3, 9)] ] g = graph.graphxy(width=10) g.plot([graph.data.list(date, x=1, y=2) for date in data], [graph.style.symbol(symbol=graph.style.symbol.changecircle)]) g.writeEPSfile("test") [ Btw: Please always send a complete example to show that something doesn't work as it should. This way it's much easier for others to test it. ] Jörg ```
 Re: [PyX-user] Changecircle and friends. From: Andrea Riciputi - 2004-12-03 09:53:30 ```And indeed your example works as it is, but fails if I add a third data=20= series, such as: data =3D [[(1, 1), (2, 2), (3, 3)], [(1, 1), (2, 4), (3, 9)], [(1, 2),=20= (2, 3), (3, 4)]] It seems quite strange! Andrea. On 3 Dec 2004, at 10:16, Joerg Lehmann wrote: > Hi, > > On 03.12.04, Andrea Riciputi wrote: >> I'm struggling with changecircle and friends but, despite the fact=20 >> I've >> read the manual and studied somewhat the code, I can't understad how >> they work and how I use them in my PyX scripts. >> >> Suppose I have the following datas structure: >> >> data =3D [[first data series],[second data series], ...] >> >> where each data series is a 2-dim list (such as [x0,y0],[x1,y1],...). >> I've tried to use changecircle in the following way: >> >> h =3D pyx.graph.graphxy(blah, blah, blah...) >> h.plot([pyx.graph.data.list(data[i], x=3D1, y=3D2) for i in >> range(len(data))], [pyx.graph.style.symbol(symbol =3D >> pyx.graph.style.symbol.changecircle)]) > > The following example works for me with PyX 0.7: > > #!/usr/bin/env python > from pyx import * > > data =3D [ [ (1, 1), (2, 2), (3, 3) ], [ (1, 1), (2, 4), (3, 9)] ] > > g =3D graph.graphxy(width=3D10) > > g.plot([graph.data.list(date, x=3D1, y=3D2) for date in data], > [graph.style.symbol(symbol=3Dgraph.style.symbol.changecircle)]) > > g.writeEPSfile("test") > > [ Btw: Please always send a complete example to show that something=20 > doesn't > work as it should. This way it's much easier for others to test it. ] > > J=F6rg > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real=20 > users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > PyX-user mailing list > PyX-user@... > https://lists.sourceforge.net/lists/listinfo/pyx-user > ```
 Re: [PyX-user] Changecircle and friends. From: Joerg Lehmann - 2004-12-03 10:04:37 ```Hi Andrea, On 03.12.04, Andrea Riciputi wrote: > And indeed your example works as it is, but fails if I add a third data > series, such as: > > data = [[(1, 1), (2, 2), (3, 3)], [(1, 1), (2, 4), (3, 9)], [(1, 2), > (2, 3), (3, 4)]] Ah. That's why I suggested always sending a complete example. > It seems quite strange! No, just a bug in the changecircle definition ;-) I just fixed it in CVS. Thanks for reporting this problem! Jörg ```