Open
Description
Hi,
The example of http://lightning-viz.org/visualizations/scatter/ don't run in my environment, because it has several errors:
First:
scala> lgn.scatter(x, y, group=group, size=size)
<console>:37: error: type mismatch;
found : Array[Float]
required: Array[Double]
lgn.scatter(x, y, group=group, size=size)
^
So you need to change every .nextFloat() to .nextDouble() like this:
val x = Array.fill(100)(Random.nextDouble())
val y = Array.fill(100)(Random.nextDouble())
val group = Array.fill(100)(Random.nextDouble() * 5).map(_.toInt)
val size = Array.fill(100)(Random.nextDouble() * 20 + 5)
and the next error:
scala> lgn.scatter(x, y, group=group, size=size)
<console>:37: error: reassignment to val
lgn.scatter(x, y, group=group, size=size)
^
I saw the source code and didn't see any group. What it's missing?
Activity