--- /dev/null
+--- gnuplot-3.7.1/graphics.c.round Wed Sep 15 09:30:29 1999
++++ gnuplot-3.7.1/graphics.c Wed Jun 6 15:59:07 2001
+@@ -583,7 +583,8 @@
+ /* compute ytop from the various components
+ * unless tmargin is explicitly specified */
+
+- ytop = (int) ((ysize + yoffset) * (t->ymax));
++ /* HBB 20010118: fix round-off bug */
++ ytop = (int) (0.5 + (ysize + yoffset) * (t->ymax));
+
+ if (tmargin < 0) {
+ int top_margin = x2label_textheight + title_textheight;
+@@ -668,7 +669,7 @@
+ /* compute ybot from the various components
+ * unless bmargin is explicitly specified */
+
+- ybot = (int) ((t->ymax) * yoffset);
++ ybot = (int) (0.5 + (t->ymax) * yoffset);
+
+ if (bmargin < 0) {
+ ybot += xtic_height + xtic_textheight;
+@@ -844,7 +845,7 @@
+ /* compute xleft from the various components
+ * unless lmargin is explicitly specified */
+
+- xleft = (int) ((t->xmax) * xoffset);
++ xleft = (int) (0.5 + (t->xmax) * xoffset);
+
+ if (lmargin < 0) {
+ xleft += (timelabel_textwidth > ylabel_textwidth ? timelabel_textwidth : ylabel_textwidth)
+@@ -905,7 +906,7 @@
+ /* compute xright from the various components
+ * unless rmargin is explicitly specified */
+
+- xright = (int) ((t->xmax) * (xsize + xoffset));
++ xright = (int) (0.5 + (t->xmax) * (xsize + xoffset));
+
+ if (rmargin < 0) {
+ /* xright -= y2label_textwidth + y2tic_width + y2tic_textwidth; */