With VegaLite.jl:
using VegaLite, DataFrames
df = DataFrame(x=randn(100), y=randn(100), z=randn(100))
df |> @vlplot(:point, x=:x, y=:y, color=:z)
You can customize the color scale with any of the pre-defined color schemes:
df |> @vlplot(:point, x=:x, y=:y, color={:z, scale={scheme=:plasma}})
You can also go entirely custom by specifying a custom piecewise scale:
df |>
@vlplot(
:point,
x=:x,
y=:y,
color={
:z,
scale={
domain=[-3, -1, 1, 3],
range=[:red, :blue, :green, :yellow]
}
}
)
And yes, I am aware that my custom color scheme example is probably a strong argument to go with the pre-defined schemes