The current plot is still extremely bare, without any axes. So let’s add those. See https://vega.github.io/vega/docs/axes/ for documentation.
To add axes to this plot, we merely add the following just before the marks
section:
...
"scales": ...,
"axes": [
{"orient": "bottom", "scale": "xscale"},
{"orient": "left", "scale": "yscale"}
],
"marks": ...
...
This will give you the following:
For axes, you must provide the orientation (whether top
, bottom
, left
or right
), and the scale that decides where the ticks should come.
Exercise - Add these axes to the plot you created in the “colour scales” section, but also add axis titles and grid lines.