Browse Source

Fix plotting bug reported by Robert Turnbull: ngspice-devel 2023-02-10.

pre-master-46
Giles Atkinson 3 years ago
committed by Holger Vogt
parent
commit
79fcb5d4bd
  1. 5
      src/frontend/plotting/graf.c

5
src/frontend/plotting/graf.c

@ -485,12 +485,15 @@ void gr_point(struct dvec *dv,
case PLOT_RETLIN: case PLOT_RETLIN:
/* If it's a linear plot, ignore first point since we don't /* If it's a linear plot, ignore first point since we don't
want to connect with oldx and oldy. */ want to connect with oldx and oldy. */
if (np)
if (np) {
#ifdef LINE_COMPRESSION_CHECKS #ifdef LINE_COMPRESSION_CHECKS
drawLine(fromx, fromy, tox, toy, dv); drawLine(fromx, fromy, tox, toy, dv);
#else #else
drawLine(fromx, fromy, tox, toy); drawLine(fromx, fromy, tox, toy);
#endif #endif
} else {
LC_flush(); // May be retrace with non-monotonic x-axis
}
if ((tics = currentgraph->ticdata) != NULL) { if ((tics = currentgraph->ticdata) != NULL) {
for (; *tics < HUGE; tics++) for (; *tics < HUGE; tics++)

Loading…
Cancel
Save