## Re: [Pyx-user] graph.data.list

 Re: [Pyx-user] graph.data.list From: Michael Schindler - 2004-05-25 12:18:15 ```On 25.05.04, Gert Ingold wrote: > the simplest solution would be to make addlinenumbers false by default. > Then the user could ask for linenumbers explicitly when needed. A better > solution was suggested by Michael. He proposes not to modify the data but > to allow something like x=N to ask for linenumbers. (I hope I have stated > Michael's opinion correctly...). Yes. Best regards, Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. ```

 [Pyx-user] graph.data.list From: Gert Ingold - 2004-05-19 21:12:57 Attachments: application/pgp-signature ```Hi, I am wondering whether the following behavior should be considered as a bug or a feature. Let us take a look at the example (similarities with the manyaxes example are not accidental): from pyx import * g =3D graph.graphxy(width=3D8) d =3D [[2.*i, 0.8*i*i] for i in range(1,10)] g.plot(graph.data.list(d, x=3D1, y=3D2)) # line A # g.plot(graph.data.list(d, x=3D1, y=3D2)) # line B # g.plot(graph.data.list(d, x=3D1, y=3D3)) # line C g.writeEPSfile("test") with lines B and C commented out. This will result in a plot of a parabola as expected. Now we uncomment line B. This will yield plusses and crosses on a straight line. The parabola is gone but can be restored by replacing line B by line C. Finally with lines A, B, and C present, one gets plusses and crosses on a line of slope 1 and squares on a line of slope 2. The resason for this behavior seems to be that the list class is adding line numbers. This would be fine if it is done once but it gets confusing if each call to graph.data.list adds another column containing line numbers. I should add that this was run under 0.6.3. Best regards, Gert --=20 Gert-Ludwig Ingold | =20 Institut fuer Physik | email: Ingold@... Universitaet Augsburg | Phone: +49-821-598-3234 D-86135 Augsburg | Fax : +49-821-598-3222 Germany | =20 WWW homepage: http://www.physik.uni-augsburg.de/theo1/ingold ```
 Re: [Pyx-user] graph.data.list From: Joerg Lehmann - 2004-05-25 11:32:03 ```Hi, On 19.05.04, Gert Ingold wrote: [ snip description of weird behavior when using data.data.list ] > The resason for this behavior seems to be that the list class is > adding line numbers. This would be fine if it is done once but it gets > confusing if each call to graph.data.list adds another column > containing line numbers. IMHO, it's not a good idea to implicitely modify the original list - except maybe when a user adds a column manually. Therefore, I would prefer a solution where the special case of column 0 is handled separately in the getcolumn method of the data class. Jörg ```
 Re: [Pyx-user] graph.data.list From: Gert Ingold - 2004-05-25 11:44:22 Attachments: application/pgp-signature ```Hi, On Tue, May 25, 2004 at 01:31:41PM +0200, Joerg Lehmann wrote: > On 19.05.04, Gert Ingold wrote: > [ snip description of weird behavior when using data.data.list ] > > The resason for this behavior seems to be that the list class is > > adding line numbers. This would be fine if it is done once but it gets > > confusing if each call to graph.data.list adds another column > > containing line numbers. >=20 > IMHO, it's not a good idea to implicitely modify the original list - > except maybe when a user adds a column manually. >=20 > Therefore, I would prefer a solution where the special case of column 0 > is handled separately in the getcolumn method of the data class. the simplest solution would be to make addlinenumbers false by default. Then the user could ask for linenumbers explicitly when needed. A better=20 solution was suggested by Michael. He proposes not to modify the data but= =20 to allow something like x=3DN to ask for linenumbers. (I hope I have stated= =20 Michael's opinion correctly...). Best regards, Gert --=20 Gert-Ludwig Ingold | =20 Institut fuer Physik | email: Ingold@... Universitaet Augsburg | Phone: +49-821-598-3234 D-86135 Augsburg | Fax : +49-821-598-3222 Germany | =20 WWW homepage: http://www.physik.uni-augsburg.de/theo1/ingold ```
 Re: [Pyx-user] graph.data.list From: Andre Wobst - 2004-05-25 12:02:43 ```Hi, On 25.05.04, Gert Ingold wrote: > the simplest solution would be to make addlinenumbers false by default. I introduced line numbers when passing data lists and enabled them by default due to users request ... > Then the user could ask for linenumbers explicitly when needed. A better > solution was suggested by Michael. He proposes not to modify the data but > to allow something like x=N to ask for linenumbers. (I hope I have stated > Michael's opinion correctly...). As far as I can see there will be a solution for that problem within the new data structure "styledata" as started a few weeks ago in CVS head. We need this kind of data structure independend of this discussion for allowing multiple graph styles to be mixed (they need to share information). Unfortunately I didn't had any time to work on that restructuring lately. But we might be able to mix different data sources which would allow for keeping the old lists unmodified. We'll see ... I'll keep it in mind. André -- by _ _ _ Dr. André Wobst / \ \ / ) wobsta@..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ ```
 Re: [Pyx-user] graph.data.list From: Joerg Lehmann - 2004-05-25 12:28:43 ```Hi André, On 25.05.04, Andre Wobst wrote: > As far as I can see there will be a solution for that problem within > the new data structure "styledata" as started a few weeks ago in CVS > head. We need this kind of data structure independend of this > discussion for allowing multiple graph styles to be mixed (they need > to share information). Unfortunately I didn't had any time to work on > that restructuring lately. But we might be able to mix different data > sources which would allow for keeping the old lists unmodified. We'll > see ... I'll keep it in mind. That's fine. I just wanted to point out that it's probably a good idea to not modify the data. Greetings, Jörg ```
 Re: [Pyx-user] graph.data.list From: Michael Schindler - 2004-05-25 12:18:15 ```On 25.05.04, Gert Ingold wrote: > the simplest solution would be to make addlinenumbers false by default. > Then the user could ask for linenumbers explicitly when needed. A better > solution was suggested by Michael. He proposes not to modify the data but > to allow something like x=N to ask for linenumbers. (I hope I have stated > Michael's opinion correctly...). Yes. Best regards, Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. ```