diff --git a/src/frontend/plotting/gnuplot.c b/src/frontend/plotting/gnuplot.c index 1e80798f4..9672af6cd 100644 --- a/src/frontend/plotting/gnuplot.c +++ b/src/frontend/plotting/gnuplot.c @@ -111,10 +111,11 @@ void ft_gnuplot(double *xlims, double *ylims, /* get linewidth for plotting the graph from .spiceinit */ if (!cp_getvar("xbrushwidth", CP_NUM, &linewidth, 0)) linewidth = 1; - if (linewidth < 1) linewidth = 1; + if (linewidth < 1) + linewidth = 1; /* get linewidth for grid from .spiceinit */ if (!cp_getvar("gridwidth", CP_NUM, &gridlinewidth, 0)) - gridlinewidth = linewidth; + gridlinewidth = 1; if (gridlinewidth < 1) gridlinewidth = 1; diff --git a/src/frontend/plotting/x11.c b/src/frontend/plotting/x11.c index 7f0b71fda..b60ef09f4 100644 --- a/src/frontend/plotting/x11.c +++ b/src/frontend/plotting/x11.c @@ -152,7 +152,7 @@ X11_Init(void) return (1); } - if (cp_getvar("old_x11", CP_BOOL, NULL)) + if (cp_getvar("old_x11", CP_BOOL, NULL, 0)) old_x11 = TRUE; # ifdef DEBUG @@ -478,7 +478,7 @@ X11_NewViewport(GRAPH *graph) } /* font size */ - if (!cp_getvar("xfont_size", CP_NUM, &xfont_size)) + if (!cp_getvar("xfont_size", CP_NUM, &xfont_size, 0)) xfont_size = 16; if(old_x11) { diff --git a/src/frontend/wdisp/windisp.c b/src/frontend/wdisp/windisp.c index 6f7f99d9b..f6b2a4078 100644 --- a/src/frontend/wdisp/windisp.c +++ b/src/frontend/wdisp/windisp.c @@ -3,7 +3,7 @@ * Wolfgang Muees 27.10.97 * Holger Vogt 07.12.01 * Holger Vogt 05.12.07 - * Holger Vogt 01.11.18 + * Holger Vogt 01.11.18 */ #include "ngspice/ngspice.h" @@ -823,6 +823,18 @@ int WIN_NewViewport(GRAPH *graph) graph->absolute.width = wd->Area.right; graph->absolute.height = wd->Area.bottom; + /* get linewidth information from .spiceinit or .control section */ + if (!cp_getvar("xbrushwidth", CP_NUM, &linewidth, 0)) + linewidth = 0; + if (linewidth < 0) + linewidth = 0; + + /* get linewidth information from .spiceinit or .control section */ + if (!cp_getvar("gridwidth", CP_NUM, &gridlinewidth, 0)) + gridlinewidth = 0; + if (gridlinewidth < 0) + gridlinewidth = 0; + /* wait until the window is really there */ WaitForIdle();