fplot: compute y range correctly when used with multiple graphs
This commit is contained in:
parent
55f067553a
commit
f102882990
|
@ -410,8 +410,6 @@ drawgraph(Code *co, Rectangle *r)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
gymin = Inf(1);
|
|
||||||
gymax = Inf(-1);
|
|
||||||
for(x = r->min.x; x < r->max.x; x++)
|
for(x = r->min.x; x < r->max.x; x++)
|
||||||
drawinter(co, r, convx(r, x), convx(r, x + 1), 0);
|
drawinter(co, r, convx(r, x), convx(r, x + 1), 0);
|
||||||
}
|
}
|
||||||
|
@ -567,6 +565,8 @@ drawgraphs(void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
color = display->black;
|
color = display->black;
|
||||||
|
gymin = Inf(1);
|
||||||
|
gymax = Inf(-1);
|
||||||
for(i = 0; i < nfns; i++)
|
for(i = 0; i < nfns; i++)
|
||||||
drawgraph(&fns[i], &screen->r);
|
drawgraph(&fns[i], &screen->r);
|
||||||
if(!aflag)
|
if(!aflag)
|
||||||
|
|
Loading…
Reference in a new issue