Makie recipe for creating a scatter plot with points colored by value

This is much easier than I had thought, for anyone that comes next here is the recipe (See Makie docs has a more generic scatter example and examples for colored lines:

   using CairoMakie

    # create synthetic data
    n = 1000;
    x = 1:n;
    y = sin.(collect(x) .* .05);
    z = vcat(1:n/2, n/2:-1:1) .- n/4

    # set color axis limits which by default is automatically equal to the extrema of the color values
    colorrange = [-n/4, n/4];
    
    # choose color map [https://docs.juliahub.com/AbstractPlotting/6fydZ/0.12.10/generated/colors.html]
    cmap = :balance
    
    # make colored scatter plot
    fig = Figure()
    scatter(fig[1, 1], x, y; color=z, colormap = cmap, markersize=10, strokewidth=0, colorrange = colorrange)

    # add colorbar 
    Colorbar(fig[1, 2], colorrange = colorrange, colormap = cmap,
    label = "colored data")

    # show Figure
    fig