plotcurv.c, improve simple plot by checking for NAN
This commit is contained in:
parent
e2b541086c
commit
3f96807632
|
|
@ -137,6 +137,17 @@ ft_graf(struct dvec *v, struct dvec *xs, bool nostart)
|
|||
realpart(xs->v_compdata[i]);
|
||||
dy = isreal(v) ? v->v_realdata[i] :
|
||||
realpart(v->v_compdata[i]);
|
||||
/* check for NAN */
|
||||
if (isnan(dy)) {
|
||||
lx = dx;
|
||||
ly = dy;
|
||||
continue;
|
||||
}
|
||||
else if (!isnan(dy) && isnan(ly)) {
|
||||
lx = dx;
|
||||
ly = dy;
|
||||
}
|
||||
/* end of check */
|
||||
if ((i == 0 || (dir > 0 ? lx > dx : dir < 0 ? lx < dx : 0)) &&
|
||||
(mono || (xs->v_plot && xs->v_plot->pl_scale == xs)))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue