当我绘制它时,以下Vegas窗口是空白的:
package com.plot
import vegas.Bar
import vegas.DSL.OptArg.anyToOpt
import vegas.DefaultValueTransformer
import vegas.Nom
import vegas.Quant
import vegas.Vegas
import vegas.render.WindowRenderer.toWindow
object Plot {
def main(args: Array[String]): Unit = {
val plot = Vegas("Country Pop").
withData(
Seq(
Map("country" -> "USA", "population" -> 314),
Map("country" -> "UK", "population" -> 64),
Map("country" -> "DK", "population" -> 80))).
encodeX("country", Nom).
encodeY("population", Quant).
mark(Bar)
plot.show
}
}
以下是生成的空白窗口: