fplot: compute y range correctly when used with multiple graphs

This commit is contained in:
aiju 2018-11-30 16:12:02 +00:00
parent 55f067553a
commit f102882990

View file

@ -410,8 +410,6 @@ drawgraph(Code *co, Rectangle *r)
{
int x;
gymin = Inf(1);
gymax = Inf(-1);
for(x = r->min.x; x < r->max.x; x++)
drawinter(co, r, convx(r, x), convx(r, x + 1), 0);
}
@ -567,6 +565,8 @@ drawgraphs(void)
int i;
color = display->black;
gymin = Inf(1);
gymax = Inf(-1);
for(i = 0; i < nfns; i++)
drawgraph(&fns[i], &screen->r);
if(!aflag)