Skip to content

Instantly share code, notes, and snippets.

@chriseyre2000
Last active July 6, 2021 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriseyre2000/475e3d111f182851552c073b0982add3 to your computer and use it in GitHub Desktop.
Save chriseyre2000/475e3d111f182851552c073b0982add3 to your computer and use it in GitHub Desktop.
Livebook graph
# If this does not work on a docker version of livebook, update your docker image
# docker run -p 8080:8080 livebook/livebook
Mix.install([
{:vega_lite, "~> 0.1.0"},
{:kino, "~> 0.2.1"}
])
alias VegaLite, as: Vl
Vl.new(width: 400, height: 400)
|> Vl.data_from_series(iteration: 1..100, score: 1..100)
|> Vl.mark(:line)
|> Vl.encode_field(:x, "iteration", type: :quantitative)
|> Vl.encode_field(:y, "score", type: :quantitative )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment