Skip to content

Instantly share code, notes, and snippets.

@CORDEA
Last active August 29, 2015 14:06
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 CORDEA/925d6ceecd1b11234d6e to your computer and use it in GitHub Desktop.
Save CORDEA/925d6ceecd1b11234d6e to your computer and use it in GitHub Desktop.
#!/bin/env python
# encoding:utf-8
#
#
__Author__ = "CORDEA"
__date__ = "2014-09-23"
import numpy as np
import matplotlib.pyplot as plt
pi="14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214"
lst = []
ind = []
for n in range(len(pi)):
lst.append(int(pi[n]))
ind.append(int(n+1))
lst = np.array(lst)
ind = np.array(ind)
r = 2 * ind
theta = (np.pi * ind) / 10
area = 120 * lst * (ind * 0.012)
colors = theta
ax = plt.subplot(111, polar=True)
c = plt.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv, edgecolors='#636363')
c.set_alpha(0.75)
ax.spines['polar'].set_visible(False)
ax.axes.get_xaxis().set_visible(False)
ax.axes.get_yaxis().set_visible(False)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment