Dabs commited on
Commit
27d0603
1 Parent(s): c0419ac
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -19,12 +19,13 @@ def ulamspiral(n):
19
  cambio_dir = 0
20
  last_x = 0
21
  last_y = 0
 
22
  plt.axis('off')
23
  for step in range(1, n+1):
24
  if isprime(step):
25
- plt.plot(x, y, "ko")
26
  if step != 1:
27
- plt.plot([last_x, x], [last_y, y], "k-")
28
  last_x = x
29
  last_y = y
30
  if estado == 4:
@@ -46,6 +47,6 @@ def ulamspiral(n):
46
 
47
  return plt.gcf()
48
 
49
- iface = gr.Interface(ulamspiral, gr.inputs.Slider(1, 1000, 1), "plot")
50
 
51
  iface.launch()
 
19
  cambio_dir = 0
20
  last_x = 0
21
  last_y = 0
22
+ plt.figure(facecolor=(0, 0, 0), figsize=(20,20))
23
  plt.axis('off')
24
  for step in range(1, n+1):
25
  if isprime(step):
26
+ plt.plot(x, y, "wo", markersize=8)
27
  if step != 1:
28
+ plt.plot([last_x, x], [last_y, y], "w-", markersize=2)
29
  last_x = x
30
  last_y = y
31
  if estado == 4:
 
47
 
48
  return plt.gcf()
49
 
50
+ iface = gr.Interface(ulamspiral, gr.inputs.Slider(1, 10000, 1), "plot")
51
 
52
  iface.launch()