相关疑难解决方法(0)

如何使用 Vega-Lite 在轴上绘制多个变量?

按照 Vega-Lite 的西雅图天气教程,很容易按月绘制平均最低温度:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "data": {
    "url": "https://vega.github.io/vega-lite/data/seattle-weather.csv"
  },
  "mark": "line",
  "encoding": {
    "x": {
      "timeUnit": "month",
      "field": "date",
      "type": "temporal"
    },
    "y": {
      "aggregate": "mean",
      "field": "temp_min",
      "type": "quantitative"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

这个数据集也有temp_max变量。如何在 y 轴上同时绘制temp_mintemp_max

vega vega-lite

1
推荐指数
1
解决办法
713
查看次数

标签 统计

vega ×1

vega-lite ×1