diff --git a/src/main/groovy/geoscript/plot/Scatter.groovy b/src/main/groovy/geoscript/plot/Scatter.groovy index f9ddca80..77904efa 100644 --- a/src/main/groovy/geoscript/plot/Scatter.groovy +++ b/src/main/groovy/geoscript/plot/Scatter.groovy @@ -24,14 +24,15 @@ class Scatter { * Create a scatter plot Chart * @param options Named parameter options * * @param data A List of data where each item is a List with two items. * @return A Chart @@ -40,6 +41,7 @@ class Scatter { String title = options.get("title","") String xLabel = options.get("xLabel","") String yLabel = options.get("yLabel","") + String dataLabel = options.get("dataLabel", "Values") int size = options.get("size",3) boolean legend = options.get("legend", true) boolean tooltips = options.get("tooltips", true) @@ -52,7 +54,7 @@ class Scatter { def yAxis = new NumberAxis(yLabel) yAxis.autoRangeIncludesZero = false - def series = new XYSeries("Values") + def series = new XYSeries(dataLabel) data.each {datum -> series.add(datum[0], datum[1]) }