hvega-0.12.0.7: tests/specs/gallery/scatter/smoothing2.vl
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {
"url": "https://vega.github.io/vega-lite/data/movies.json"
},
"description": "How can we 'smooth' and rename data?",
"height": 300,
"layer": [
{
"encoding": {
"x": {
"field": "Rotten_Tomatoes_Rating",
"type": "quantitative"
},
"y": {
"field": "IMDB_Rating",
"type": "quantitative"
}
},
"mark": {
"filled": true,
"opacity": 0.3,
"type": "point"
}
},
{
"encoding": {
"x": {
"field": "Rotten_Tomatoes_Rating",
"type": "quantitative"
},
"y": {
"field": "ly",
"type": "quantitative"
}
},
"mark": {
"color": "firebrick",
"type": "line"
},
"transform": [
{
"as": [
"Rotten_Tomatoes_Rating",
"ly"
],
"loess": "IMDB_Rating",
"on": "Rotten_Tomatoes_Rating"
}
]
},
{
"encoding": {
"x": {
"field": "Rotten_Tomatoes_Rating",
"type": "quantitative"
},
"y": {
"field": "ry",
"type": "quantitative"
}
},
"mark": {
"color": "orange",
"type": "line"
},
"transform": [
{
"as": [
"Rotten_Tomatoes_Rating",
"ry"
],
"on": "Rotten_Tomatoes_Rating",
"regression": "IMDB_Rating"
}
]
}
],
"width": 300
}