## [PyX-checkins] SF.net SVN: pyx: [2813] trunk/pyx/gallery/graphs/shift.py

 [PyX-checkins] SF.net SVN: pyx: [2813] trunk/pyx/gallery/graphs/shift.py From: - 2006-05-24 15:17:44 ```Revision: 2813 Author: wobsta Date: 2006-05-24 08:17:32 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/pyx/?rev=2813&view=rev Log Message: ----------- don't use the mktuple construct anymore (reported by Axel Freyn) Modified Paths: -------------- trunk/pyx/gallery/graphs/shift.py Modified: trunk/pyx/gallery/graphs/shift.py =================================================================== --- trunk/pyx/gallery/graphs/shift.py 2006-05-24 12:44:19 UTC (rev 2812) +++ trunk/pyx/gallery/graphs/shift.py 2006-05-24 15:17:32 UTC (rev 2813) @@ -3,9 +3,6 @@ # While most axes do not have a size parameter, it can be added to # any existing axis very easily. For linear axes so called sizedlinear # and autosizedlinear axes are defined by PyX already. -# -# Note: The mytuple/lambda construct is currently a work-around to -# create tuples within the mathtree expression evaluator. from pyx import * @@ -14,8 +11,7 @@ graph.axis.sizedlinear(size=3, min=0, max=3)] g = graph.graphxy(width=8, y=graph.axis.split(subaxes=subaxes)) -g.plot([graph.data.file("shift.dat", x=1, y="mktuple(i, \$(i+2))", - context={"mktuple": lambda x, y: (x, y), "i": i}) +g.plot([graph.data.file("shift.dat", x=1, y="i, \$(i+2)", context={"i": i}) for i in range(3)], [graph.style.line()]) g.writeEPSfile("shift") g.writePDFfile("shift") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```

### Thread view

 [PyX-checkins] SF.net SVN: pyx: [2813] trunk/pyx/gallery/graphs/shift.py From: - 2006-05-24 15:17:44 ```Revision: 2813 Author: wobsta Date: 2006-05-24 08:17:32 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/pyx/?rev=2813&view=rev Log Message: ----------- don't use the mktuple construct anymore (reported by Axel Freyn) Modified Paths: -------------- trunk/pyx/gallery/graphs/shift.py Modified: trunk/pyx/gallery/graphs/shift.py =================================================================== --- trunk/pyx/gallery/graphs/shift.py 2006-05-24 12:44:19 UTC (rev 2812) +++ trunk/pyx/gallery/graphs/shift.py 2006-05-24 15:17:32 UTC (rev 2813) @@ -3,9 +3,6 @@ # While most axes do not have a size parameter, it can be added to # any existing axis very easily. For linear axes so called sizedlinear # and autosizedlinear axes are defined by PyX already. -# -# Note: The mytuple/lambda construct is currently a work-around to -# create tuples within the mathtree expression evaluator. from pyx import * @@ -14,8 +11,7 @@ graph.axis.sizedlinear(size=3, min=0, max=3)] g = graph.graphxy(width=8, y=graph.axis.split(subaxes=subaxes)) -g.plot([graph.data.file("shift.dat", x=1, y="mktuple(i, \$(i+2))", - context={"mktuple": lambda x, y: (x, y), "i": i}) +g.plot([graph.data.file("shift.dat", x=1, y="i, \$(i+2)", context={"i": i}) for i in range(3)], [graph.style.line()]) g.writeEPSfile("shift") g.writePDFfile("shift") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```

## Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks