Created
October 8, 2019 18:30
-
-
Save Wikunia/ae260cead7ba7e70bf62d445c5ace465 to your computer and use it in GitHub Desktop.
Plotting primes in polar coordinates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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