jWork.ORG forums
Log scale F1D - Printable Version

+- jWork.ORG forums (http://jwork.org/forum)
+-- Forum: SCaVis (/forumdisplay.php?fid=1)
+--- Forum: ScaVis bug report (/forumdisplay.php?fid=3)
+--- Thread: Log scale F1D (/showthread.php?tid=27)



Log scale F1D - jworkorg - 06-26-2012 12:43 PM

Thanks for the info.

Indeed at this moment the only solution is to increase the number of divisions using setPoints(int bins).

In this case the points are evaluated in the linear scale between Min and Max, but HPlot and HPlotJa
show the points in the log scale (both have exactly the same implementation).

I think at this moment the best solution is to use not "function", but "ln(function)" and plot it on the linear scale

Sergei

Code:
from jhplot import F1D
from jhplot import HPlotJa

x = [0.1, 10]
y = [-10, 5]

f = F1D("log(1-(2*e**(-x)))", x[0], x[1])
# f.setPoints(10000)

c1 = HPlotJa("Canvas")
c1.visible()
c1.setAutoRange()
c1.setRangeX(x[0], x[1])
c1.setRangeY(y[0], y[1])
c1.draw(f)
c1.export("f.png")