viewof view_title = embed(
{
width: 500,
height: 300,
data: {url: 'https://vega.github.io/vega-datasets/data/cars.json'},
mark:
{type: "circle", tooltip: true},
encoding: {
x: {"field": "Displacement", "type": "quantitative", "scale": {"zero": false}, "title": "Engine displacement (L)"},
y: {"field": "Miles_per_Gallon", "type": "quantitative", "scale": {"zero": false}, "title": "Highway fuel economy (mpg)"},
color: {"field":"Origin", "title":"Country of Origin"}
},
"title": { "text": "Fuel efficiency generally decreases with engine size",
"subtitle": "Two seaters (sports cars) are an exception because of their light weight",
"anchor":"start"
}
})