Skip to content

Instantly share code, notes, and snippets.

@Wikunia
Created October 8, 2019 18:30
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 Wikunia/ae260cead7ba7e70bf62d445c5ace465 to your computer and use it in GitHub Desktop.
Save Wikunia/ae260cead7ba7e70bf62d445c5ace465 to your computer and use it in GitHub Desktop.
Plotting primes in polar coordinates
using Plots
using ColorSchemes
using Primes
function plot_primes(x)
l_primes = primes(x)
colors = get(ColorSchemes.summer, [i/x for i in l_primes])
scatter(l_primes, l_primes; size=(1000,1000), legend=false, axis=false, background_color=:black, foreground_color=:black,
proj=:polar, markersize=1, markercolor=colors)
png("polar_primes_$(x)")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment