Hi,
I'm writing a little application to plot graphs using qt 4.4 and qwt.
The script is parsed using QtScript, and the program calculates for each x value an y value using the script. (with dx between the points). The points are then plotted using qwt.
This works good, but when you try to plot the graph for 1/x (or other functiosn returning NaN), there is a problem. Qwt draws the NaN value and you get the following graph instead of two "asymptotes":
Is there a way to solve this? (I could create two curves, one for -10 < x 0 and one for 0 < x < 10, but I would get problems with functions like 1 / (x -2)
Edit: I just did some others test and you get similiar problems with other graps with NaN values: for instance
Math.sqrt(plotx); (x ^ 0.5 )
and
Math.log(plotx); (ln(x))
Bookmarks