# HG changeset patch # User Felix Wolfsteller # Date 1336720261 0 # Node ID 6fda6ec9e426f3cff62512e589ba2e621331bea4 # Parent 5652a851f1b4601bfdbbd447c0809b59099e1c5a Added accidentally ommitted changes. flys-artifacts/trunk@4387 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 5652a851f1b4 -r 6fda6ec9e426 flys-artifacts/src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java Fri May 11 07:08:56 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java Fri May 11 07:11:01 2012 +0000 @@ -37,15 +37,17 @@ * @param series Series to add points to. * @param points Points to add to series, points[0] to 1st dim, points[1] * to 2nd dim. + * @param skipNANs if true, skip NAN values in points parameter. */ - public static void addPoints(XYSeries series, double[][] points) { + public static void addPoints(XYSeries series, double[][] points, boolean skipNANs) { if (points == null || points.length <= 1) { return; } double [] xPoints = points[0]; double [] yPoints = points[1]; for (int i = 0; i < xPoints.length; i++) { - if (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i])) { + if (skipNANs && + (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { logger.warn ("Skipping NaN in StyledSeriesBuilder."); continue; }