diff --git a/examples/memristor/memristor.sp b/examples/memristor/memristor.sp index fdb9488a7..0664f1075 100644 --- a/examples/memristor/memristor.sp +++ b/examples/memristor/memristor.sp @@ -57,9 +57,9 @@ plot tran1.alli tran2.alli alli title 'Memristor with threshold: Internal Progra settype impedance xmem.x1 tran1.xmem.x1 tran2.xmem.x1 plot xmem.x1 tran1.xmem.x1 tran2.xmem.x1 title 'Memristor with threshold: resistance' * resistance versus voltage (change occurs only above threshold!) -plot xmem.x1 vs v(1) tran1.xmem.x1 vs tran1.v(1) tran2.xmem.x1 vs tran2.v(1) title 'Memristor with threshold: resistance' +plot xmem.x1 vs v(1) tran1.xmem.x1 vs tran1.v(1) tran2.xmem.x1 vs tran2.v(1) retraceplot title 'Memristor with threshold: resistance' * current through resistor for all plots versus voltage -plot i(v1) vs v(1) tran1.i(v1) vs tran1.v(1) tran2.i(v1) vs tran2.v(1) title 'Memristor with threshold: external current loops' +plot i(v1) vs v(1) tran1.i(v1) vs tran1.v(1) tran2.i(v1) vs tran2.v(1) retraceplot title 'Memristor with threshold: external current loops' .endc .end diff --git a/examples/memristor/memristor_x.sp b/examples/memristor/memristor_x.sp index 1c283e734..98fbc6528 100644 --- a/examples/memristor/memristor_x.sp +++ b/examples/memristor/memristor_x.sp @@ -47,11 +47,11 @@ Rmem plus minus r={V(x)} op print all ac lin 101 1 100k -plot v(11) +*plot v(11) * approx. 100 simulation points let deltime = stime/100 tran $&deltime $&stime uic -* plot i(v1) vs v(1) +*plot i(v1) vs v(1) retrace *** you may just stop here *** * raise the frequency let newfreq = 1.2/stime @@ -75,9 +75,9 @@ let res2 = tran2.v(1)/(tran2.I(v1) + 1e-16) settype impedance res res1 res2 plot res vs time res1 vs tran1.time res2 vs tran2.time title 'Memristor with threshold: resistance' * resistance versus voltage (change occurs only above threshold!) -plot res vs v(1) res1 vs tran1.v(1) res2 vs tran2.v(1) title 'Memristor with threshold: resistance' +plot res vs v(1) res1 vs tran1.v(1) res2 vs tran2.v(1) retraceplot title 'Memristor with threshold: resistance' * current through resistor for all plots versus voltage -plot i(v1) vs v(1) tran1.i(v1) vs tran1.v(1) tran2.i(v1) vs tran2.v(1) title 'Memristor with threshold: external current loops' +plot i(v1) vs v(1) tran1.i(v1) vs tran1.v(1) tran2.i(v1) vs tran2.v(1) retraceplot title 'Memristor with threshold: external current loops' .endc .end diff --git a/src/frontend/plotting/gnuplot.c b/src/frontend/plotting/gnuplot.c index a99b1e56b..96a77fd5d 100644 --- a/src/frontend/plotting/gnuplot.c +++ b/src/frontend/plotting/gnuplot.c @@ -319,7 +319,7 @@ void ft_gnuplot(double *xlims, double *ylims, (void) fclose(file); /* Write out the data and setup arrays */ - bool mono = (plottype == PLOT_MONOLIN); + bool mono = (plottype != PLOT_RETLIN); dir = 0; prev_xval = NAN; for (i = 0; i < scale->v_length; i++) { diff --git a/src/frontend/plotting/plotcurv.c b/src/frontend/plotting/plotcurv.c index 768e9560d..da7026adb 100644 --- a/src/frontend/plotting/plotcurv.c +++ b/src/frontend/plotting/plotcurv.c @@ -130,7 +130,7 @@ ft_graf(struct dvec *v, struct dvec *xs, bool nostart) * interpolation. */ if ((degree == 1) && (gridsize == 0)) { - bool mono = (currentgraph->plottype == PLOT_MONOLIN); + bool mono = (currentgraph->plottype != PLOT_RETLIN); dir = 0; for (i = 0, j = v->v_length; i < j; i++) { dx = isreal(xs) ? xs->v_realdata[i] : diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index 997ada184..6e91694fd 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -600,14 +600,14 @@ bool plotit(wordlist *wl, const char *hcopy, const char *devname) pfound = TRUE; } } - if (getflag(wl, "noretraceplot")) { + if (getflag(wl, "retraceplot")) { if (pfound) { fprintf(cp_err, "Warning: too many plot types given. " - "\"noretraceplot\" is ignored.\n"); + "\"retraceplot\" is ignored.\n"); } else { - ptype = PLOT_MONOLIN; + ptype = PLOT_RETLIN; pfound = TRUE; } } @@ -640,8 +640,8 @@ bool plotit(wordlist *wl, const char *hcopy, const char *devname) if (eq(buf, "linplot")) { ptype = PLOT_LIN; } - else if (eq(buf, "noretraceplot")) { - ptype = PLOT_MONOLIN; + else if (eq(buf, "retraceplot")) { + ptype = PLOT_RETLIN; } else if (eq(buf, "combplot")) { ptype = PLOT_COMB; diff --git a/src/include/ngspice/dvec.h b/src/include/ngspice/dvec.h index 3833295b7..ea0a9b83c 100644 --- a/src/include/ngspice/dvec.h +++ b/src/include/ngspice/dvec.h @@ -22,7 +22,7 @@ enum dvec_flags { /* Plot types. */ typedef enum { - PLOT_LIN, PLOT_COMB, PLOT_POINT, PLOT_MONOLIN + PLOT_LIN, PLOT_COMB, PLOT_POINT, PLOT_RETLIN } PLOTTYPE;