Fix bug 590, but only for GUI with MS Windows.

X11 for Cygwin, Linux is not yet o.k.
This commit is contained in:
Holger Vogt 2022-10-17 20:27:15 +02:00
parent 74630bf570
commit 6b0ba58e42
1 changed files with 2 additions and 2 deletions

View File

@ -639,12 +639,12 @@ lingrid(GRAPH *graph, double lo, double hi, double delta, int type, Axis axis)
dd[1] = hi;
/* Reset the max coordinate to deal with round-off error. */
if (nsp && (delta == 0.0)) {
if (nsp) {
if (axis == x_axis)
graph->viewport.width = (int)(spacing * nsp);
else
graph->viewport.height = (int)(spacing * nsp);
} else if (!nsp) {
} else {
nsp = 1;
}