Skip to content

Commit f47a6a9

Browse files
committed
update
1 parent d84728a commit f47a6a9

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

examples/matplotlib/fractal/mandelbrot.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
niter = np.zeros((N,N), dtype=np.int)
5757
niter[:,:] = -1
5858

59-
MAX_ITER = 1024 #1024
59+
MAX_ITER = 1024
6060

6161
for n in range(MAX_ITER):
6262
# potentially faster
@@ -69,18 +69,8 @@
6969
# some things may still have not passed
7070
niter[niter == -1] = MAX_ITER-1
7171

72-
print(niter.min(), niter.max())
73-
74-
# we should do the colors based on putting equal numbers of points in
75-
# the plot for each color value, using a histogram
76-
hist, edges = np.histogram(niter, range=(0, MAX_ITER-1), bins=256)
77-
centers = 0.5*(edges[1:] + edges[:-1])
78-
79-
80-
plt.imshow(np.log10(niter.T), extent=[xmin, xmax, ymin, ymax], origin="lower", cmap="magma_r")
72+
plt.imshow(np.log10(niter.T), extent=[xmin, xmax, ymin, ymax],
73+
origin="lower", cmap="magma_r")
8174
f = plt.gcf()
8275
f.set_size_inches(8.0, 8.0)
83-
#plt.show()
8476
plt.savefig("mandel.png")
85-
86-

0 commit comments

Comments
 (0)