Update of /cvsroot/pyx/pyx/pyx/graph
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23468/pyx/graph
Modified Files:
data.py
Log Message:
fix handling of logarithmic axes
Index: data.py
===================================================================
RCS file: /cvsroot/pyx/pyx/pyx/graph/data.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** data.py 23 Mar 2005 16:14:31 -0000 1.36
--- data.py 3 May 2005 16:55:13 -0000 1.37
***************
*** 24,28 ****
! import re, ConfigParser, warnings
from pyx import mathtree, text
from pyx.graph import style
--- 24,28 ----
! import math, re, ConfigParser, warnings
from pyx import mathtree, text
from pyx.graph import style
***************
*** 477,481 ****
xaxis = graph.axes[self.xname]
from pyx.graph.axis import logarithmic
! log = isinstance(xaxis, logarithmic)
if self.min is not None:
min = self.min
--- 477,481 ----
xaxis = graph.axes[self.xname]
from pyx.graph.axis import logarithmic
! logaxis = isinstance(xaxis.axis, logarithmic)
if self.min is not None:
min = self.min
***************
*** 486,496 ****
else:
max = xaxis.data.max
! if log:
! min = log(min)
! max = log(max)
for i in range(self.numberofpoints):
x = min + (max-min)*i / (self.numberofpoints-1.0)
! if log:
! x = exp(x)
dynamiccolumns[self.xname].append(x)
self.context[self.xname] = x
--- 486,496 ----
else:
max = xaxis.data.max
! if logaxis:
! min = math.log(min)
! max = math.log(max)
for i in range(self.numberofpoints):
x = min + (max-min)*i / (self.numberofpoints-1.0)
! if logaxis:
! x = math.exp(x)
dynamiccolumns[self.xname].append(x)
self.context[self.xname] = x
|