|
From: SourceForge.net <no...@so...> - 2004-06-22 09:25:25
|
Bugs item #977323, was opened at 2004-06-22 12:25 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442886&aid=977323&group_id=45430 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Marko Vendelin (tmp001) Assigned to: Nobody/Anonymous (nobody) Summary: rater.py: division by Zero Initial Comment: I would like to report a bug (or rather strange feature :) ) in pyx/graph/axis/rater.py. If I specify limits of axis equal to [12.5 to 1050] then pyx crashes somewhere in rater.py: ------ Example program: from pyx import * g = graph.graphxy(height=8, width=8, x=graph.axis.linear(min=12.5, max=1050, title=r"\large{X}"), y=graph.axis.linear(title=r"\large{Y}") ) g.plot( graph.data.list( [[0, 50], [10, 50]], addlinenumbers=0, x=0, y=1), graph.style.line(lineattrs=[style.linewidth.thick,style.linecap.round]) ) g.writetofile("test.eps") ------- Output: Traceback (most recent call last): File "test.py", line 10, in ? g.writetofile("test.eps") File "/home/markov/python/graphics/PyX-0.6.3/pyx/canvas.py", line 533, in writetofile self.writeEPSfile(filename, *args, **kwargs) File "/home/markov/python/graphics/PyX-0.6.3/pyx/canvas.py", line 367, in writeEPSfile abbox = bbox is not None and bbox or self.bbox() File "/home/markov/python/graphics/PyX-0.6.3/pyx/graph/graph.py", line 418, in bbox self.finish() File "/home/markov/python/graphics/PyX-0.6.3/pyx/graph/graph.py", line 368, in finish self.domethods[0]() File "/home/markov/python/graphics/PyX-0.6.3/pyx/graph/graph.py", line 310, in dolayout axis.finish(self.axespos[key]) File "/home/markov/python/graphics/PyX-0.6.3/pyx/graph/axis/axis.py", line 313, in finish newrate = self.rater.rateticks(self, newticks, self.density) File "/home/markov/python/pyx/graph/axis/rater.py", line 193, in rateticks return rate/weight ZeroDivisionError: integer division or modulo by zero cheers, Marko ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442886&aid=977323&group_id=45430 |