Scatterplot with nulls in gray

Source code Author

using Deneb

data = Data(url="https://vega.github.io/vega-datasets/data/movies.json")

chart = Data(data) * Mark(:point, invalid=nothing) * Encoding(
    "IMDB Rating:Q",
    "Rotten Tomatoes Rating:Q",
    color=condition_test(
        "datum['IMDB Rating'] === null || datum['Rotten Tomatoes Rating'] === null",
        "#aaa"
    )
)

This page was generated using DemoCards.jl and Literate.jl.