From 79fcb5d4bd6363d5519283f837d0879d7dd4e00e Mon Sep 17 00:00:00 2001 From: Giles Atkinson <“gatk555@gmail.com”> Date: Tue, 28 Feb 2023 17:31:35 +0000 Subject: [PATCH] Fix plotting bug reported by Robert Turnbull: ngspice-devel 2023-02-10. --- src/frontend/plotting/graf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontend/plotting/graf.c b/src/frontend/plotting/graf.c index 2e9a70797..929a6e5fb 100644 --- a/src/frontend/plotting/graf.c +++ b/src/frontend/plotting/graf.c @@ -485,12 +485,15 @@ void gr_point(struct dvec *dv, case PLOT_RETLIN: /* If it's a linear plot, ignore first point since we don't want to connect with oldx and oldy. */ - if (np) + if (np) { #ifdef LINE_COMPRESSION_CHECKS drawLine(fromx, fromy, tox, toy, dv); #else drawLine(fromx, fromy, tox, toy); #endif + } else { + LC_flush(); // May be retrace with non-monotonic x-axis + } if ((tics = currentgraph->ticdata) != NULL) { for (; *tics < HUGE; tics++)