维加斯窗口是空白的

时间:2018-03-14 06:30:46

标签: scala vegas-viz

当我绘制它时,以下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
  }
}

以下是生成的空白窗口:

enter image description here

0 个答案:

没有答案