Skip to content

Instantly share code, notes, and snippets.

@Arkoniak
Created February 25, 2020 09:42
Show Gist options
  • Save Arkoniak/edd97d9a614790372d2d116bd715b56a to your computer and use it in GitHub Desktop.
Save Arkoniak/edd97d9a614790372d2d116bd715b56a to your computer and use it in GitHub Desktop.
using Primes
using DataFrames
using VegaLite
from_polar(t::Tuple) = (t[1]*cos(t[2]), t[1]*sin(t[2]))
dots = primes(100000) |> z -> map(x -> (x, x), z) |> x -> from_polar.(x)
DataFrame(dots) |> df -> rename!(df, [:x, :y]) |>
@vlplot(mark={
type=:circle,
size = 5, color = "gold"
}, encoding={x = {:x, axis={grid=false}}, y = {:y, axis={grid=false}}},
width = 800,
height = 800,
background = "#101010"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment