Login  Register

Re: Bug in the "List..." command of plot windows

Posted by CARL Philippe (LBP) on Jun 10, 2014; 7:06pm
URL: http://imagej.273.s1.nabble.com/Bug-in-the-List-command-of-plot-windows-tp5008115p5008118.html

Dear Tiago,
I'm responsible for error at the Y_FORCE2GRID.
Thanks a lot for reporting this mistake.
My best regards,
Philippe

Le Mardi 10 Juin 2014 19:32 CEST, Tiago Ferreira <[hidden email]> a écrit:

> Dear Wayne (and others):
>
> Just noticed that since IJ 1.48, the "List..." button in PlotWindows reports and
> empty table unless data series are drawn as "lines" or "dots". Here is a .bsh
> example:
>
> double[] x1 = {1, 2, 3, 4, 5};
> double[] y1 = {5, 4, 3, 2, 1};
> double[] x2 = {5, 6, 7, 8, 9};
> double[] y2 = {9, 8, 7, 6, 5};
>
> plot = new Plot("Pressing List... Fails", "x", "y");
> plot.setLimits(0,10,0,10);
> plot.addPoints(x1, y1, Plot.CROSS);
> plot.addPoints(x2, y2, Plot.CIRCLE);
> plot.show();
>
> plot = new Plot("Pressing List... Works", "x", "y");
> plot.setLimits(0,10,0,10);
> plot.addPoints(x1, y1, Plot.LINE);
> plot.addPoints(x2, y2, Plot.LINE);
> plot.show();
>
> I'm guessing this behavior was introduced in IJ 1.48m14:
> <https://github.com/imagej/imagej1/blame/master/ij/gui/Plot.java#L367>
>
> (Release notes: Fixed a bug that caused the "List" option in plot windows to
>  sometimes display duplicate arrays.)
>
> However, current behavior is actually quite disappointing as we loose access to
> the data when multiple series get plotted. I could bypass this by using
> different colors, but often different shapes allow easier distinction of
> datasets...
>
> Would it be possible to revert to the old behavior?
> What caused the listing of duplicate arrays? Perhaps there is another workaround?
>
> -tiago
>
> PS: While at it, it seems that Y_FORCE2GRID is never used, rather X_FORCE2GRID
>     is used twice:
>     <https://github.com/imagej/imagej1/blob/master/ij/gui/Plot.java#L765>
>         if ((flags&X_FORCE2GRID)!=0)
>     <https://github.com/imagej/imagej1/blob/master/ij/gui/Plot.java#L838>
>         if ((flags&X_FORCE2GRID)!=0) >>Should be>> if ((flags&Y_FORCE2GRID)!=0
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html





--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html