0

当我绘制它时,以下维加斯窗口是空白的:

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
  }
}

这是生成的空白窗口:

在此处输入图像描述

4

0 回答 0