--- gnuplot-3.7.1/graph3d.c.orig Tue Oct 19 08:31:49 1999 +++ gnuplot-3.7.1/graph3d.c Thu May 18 09:33:26 2000 @@ -417,7 +417,7 @@ /* an absolute 1, with no terminal-dependent scaling ? */ ybot = (t->v_char) * 2.5 + 1; - if (key_rows && key_vpos == TUNDER) + if (key_rows && key == -1 && key_vpos == TUNDER) /* HBB 20000328 */ ybot += key_rows * key_entry_height + ktitle_lines * t->v_char; if (strlen(title.text)) { @@ -835,7 +835,7 @@ case FINANCEBARS: case VECTOR: case POINTSTYLE: - if (lkey && !clip_point(xl + key_point_offset, yl)) { + if (lkey) { key_sample_point(xl, yl, this_plot->lp_properties.p_type); } if (!(hidden3d && draw_surface)) @@ -851,7 +851,7 @@ plot3d_lines(this_plot); /* put points */ - if (lkey && !clip_point(xl + key_point_offset, yl)) + if (lkey) key_sample_point(xl, yl, this_plot->lp_properties.p_type); if (!(hidden3d && draw_surface)) @@ -1970,9 +1970,17 @@ int xl, yl; int pointtype; { - if (!clip_point(xl + key_point_offset, yl)) { - (*term->point) (xl + key_point_offset, yl, pointtype); - } else { + /* HBB 20000412: fixed incorrect clipping: the point sample was + * clipped against the graph box, even if in 'below' or 'outside' + * position. But the result of that clipping was utterly ignored, + * because the 'else' part did exactly the same thing as the + * 'then' one. Some callers of this routine thus did their own + * clipping, which I removed, along with this change. + * + * Now, all 'automatically' placed cases will never be clipped, + * only user-specified ones. */ + if ((key == -1) /* ==-1 means auto-placed key */ + || !clip_point(xl + key_point_offset, yl)) { (*term->point) (xl + key_point_offset, yl, pointtype); } }