Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
titleMandlebrot Set
import numpy as np
import matplotlib.pyplot as plt
from functools import reduce

%matplotlib inline

x, y = np.ogrid[-2:1:500j, -1.5:1.5:500j]

# Increase this to improve the shape of the fractal
iterations = 11

c = x + 1j*y

z = reduce(lambda x, y: x**2 + c, [1] * iterations, c)

plt.figure(figsize=(10, 10))
plt.imshow(np.angle(z));

plt.figure(figsize=(10, 10))
plt.imshow(np.log(np.abs(z)));

View file
nametitanic.csv
height250

References

Using the HPC Portal

...