http://bugs.gentoo.org/274693 Solves: "cb axis range undefined or overflow" error after fit Fix from upstream: https://sourceforge.net/tracker/?func=detail&atid=102055&aid=2808641&group_id=2055 --- gnuplot42/src/pm3d.c 2009-03-24 09:04:10.000000000 -0700 +++ test42/src/pm3d.c 2009-06-18 16:45:36.000000000 -0700 @@ -65,7 +65,6 @@ static quadrangle* quadrangles = (quadra /* Internal prototypes for this module */ static TBOOLEAN plot_has_palette; -static TBOOLEAN plot_wants_colorbox; static double geomean4 __PROTO((double, double, double, double)); static double median4 __PROTO((double, double, double, double)); static void pm3d_plot __PROTO((struct surface_points *, int)); @@ -1020,10 +1019,8 @@ set_plot_with_palette(int plot_num, int struct curve_points *this_2dplot = first_plot; int surface = 0; struct text_label *this_label = first_label; - TBOOLEAN want_palette_but_not_colorbox = FALSE; plot_has_palette = TRUE; - plot_wants_colorbox = TRUE; /* Is pm3d switched on globally? */ if (pm3d.implicit == PM3D_IMPLICIT) return; @@ -1035,18 +1032,12 @@ set_plot_with_palette(int plot_num, int if (this_2dplot->plot_style == IMAGE) return; #endif - if (this_2dplot->lp_properties.use_palette) { - if (this_2dplot->lp_properties.pm3d_color.type <= TC_RGB) - want_palette_but_not_colorbox = TRUE; - /* don't return yet -- decide later whether showing color box is desirable */ - else - return; - } -#ifdef EAM_DATASTRINGS - if (this_2dplot->labels && - this_2dplot->labels->textcolor.type >= TC_CB) + if (this_2dplot->lp_properties.use_palette + && this_2dplot->lp_properties.pm3d_color.type > TC_RGB) + return; + if (this_2dplot->labels + && this_2dplot->labels->textcolor.type >= TC_CB) return; -#endif this_2dplot = this_2dplot->next; } } @@ -1064,8 +1055,8 @@ set_plot_with_palette(int plot_num, int if (this_3dplot->lp_properties.use_palette) { int type = this_3dplot->lp_properties.pm3d_color.type; if (type == TC_LT || type == TC_LINESTYLE || type == TC_RGB) - want_palette_but_not_colorbox = TRUE; - /* don't return yet -- decide later whether showing color box is desirable */ + /* don't return yet */ + ; else /* TC_DEFAULT: splot x with line|lp|dot palette */ return; @@ -1097,9 +1088,7 @@ set_plot_with_palette(int plot_num, int #undef TC_USES_PALETTE /* Palette with continuous colors is not used. */ - if (want_palette_but_not_colorbox == FALSE) - plot_has_palette = FALSE; /* otherwise it stays TRUE */ - plot_wants_colorbox = FALSE; + plot_has_palette = FALSE; /* otherwise it stays TRUE */ } TBOOLEAN @@ -1111,6 +1100,6 @@ is_plot_with_palette() TBOOLEAN is_plot_with_colorbox() { - return plot_wants_colorbox; + return plot_has_palette && (color_box.where != SMCOLOR_BOX_NO); }