diff options
author | aiju <devnull@localhost> | 2018-11-30 16:12:02 +0000 |
---|---|---|
committer | aiju <devnull@localhost> | 2018-11-30 16:12:02 +0000 |
commit | f102882990af8f9336824f81d24eb2ee1648c9dc (patch) | |
tree | b1fd1b6e8963a78c4359614f6431e8ae8baf5c8d | |
parent | 55f067553a073c05e169adc0b95ad9d7f7269640 (diff) |
fplot: compute y range correctly when used with multiple graphs
-rw-r--r-- | sys/src/cmd/fplot.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |