Re: Ignoring points in a plot

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Ignoring-points-in-a-plot-tp5014883p5014885.html

Hi Mona,

if you plot a line where a point is NaN, it should break the line.
But I see, there is bug (caused by me); the line from the previous point
goes to the lower border of the image.

I'll send a mail to Wayne to fix it.

Here is a sample macro:

x = newArray( 1, 3, 4, 5, 6, 7, 8, 9, 11 );
y = newArray( 18, NaN, 3, 1, 7, 11, 11, 5, 2 );

Plot.create("Example Plot", "x", "y", x, y);

(For the macro, update ImageJ to the daily build; there is a problem with
NaN in macros in some recent ImageJ versions)

Michael
__________________________________________________________________

On Sat, November 7, 2015 05:21, mona_c wrote:
> Is it possible to ignore certain points when plotting a line plot? The
> following code is from plot example in Fiji. The bold line is changed,
> however it does not work i get: expected double[] y2 = { 18, Double.[], 3,
> 1, 7, 11, 11, 5, 2 };
> Changing it to Double.NaN also doesn't work correctly, since it goes to
> -inf.

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