|
From: sfeam <sf...@us...> - 2015-01-04 02:24:11
|
On Saturday, 03 January 2015 12:32:20 PM Jouke Witteveen wrote:
> When a factor name is a prefix of another, gnuplot treats them as the same.
> Hence a datafile with
> 0 0 0 foobar
> 0 1 0 foo
> will lead to only one boxplot.
>
> This patch fixes that issue.
> ---
> diff -Naur gnuplot-5.0.0.orig/src/plot2d.c gnuplot-5.0.0/src/plot2d.c
> --- gnuplot-5.0.0.orig/src/plot2d.c 2015-01-02 21:57:32.551558965 +0100
> +++ gnuplot-5.0.0/src/plot2d.c 2015-01-02 21:58:13.929255645 +0100
> @@ -1520,7 +1520,7 @@
> len = strlen(trimmed_string);
> for (label = plot->labels; label; label = label->next) {
> /* check if string is the same as the i-th factor */
> - if (label->text && !strncmp(trimmed_string, label->text, len))
> + if (label->text && !strncmp(trimmed_string, label->text, len + 1))
> break;
> }
I've created a Bug tracker entry for these issues
https://sourceforge.net/p/gnuplot/bugs/1532/
Patch 1: applied to CVS for 5.0 and 5.1
|