按照 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"
}
}
}
这个数据集也有temp_max
变量。如何在 y 轴上绘制temp_min
和绘制?temp_max