Mercurial > dive4elements > river
changeset 2686:6fda6ec9e426
Added accidentally ommitted changes.
flys-artifacts/trunk@4387 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 11 May 2012 07:11:01 +0000 |
parents | 5652a851f1b4 |
children | dc67ddd4a34c |
files | flys-artifacts/src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }