From f102882990af8f9336824f81d24eb2ee1648c9dc Mon Sep 17 00:00:00 2001 From: aiju Date: Fri, 30 Nov 2018 16:12:02 +0000 Subject: fplot: compute y range correctly when used with multiple graphs --- sys/src/cmd/fplot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/src/cmd/fplot.c') diff --git a/sys/src/cmd/fplot.c b/sys/src/cmd/fplot.c index 259f03a10..8bc53010c 100644 --- a/sys/src/cmd/fplot.c +++ b/sys/src/cmd/fplot.c @@ -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) -- cgit v1.2.3