Sebastian Raschka
last updated: 05/11/2014
import numpy as np
x = np.arange(-1,1.001,0.001)
y1 = (x**2)**(1.0/3) + np.sqrt(1-x**2)
y2 = (x**2)**(1.0/3) - np.sqrt(1-x**2)
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 12})
fig = plt.figure(figsize=(8,8))
plt.plot(x, y1, lw=15, color='r')
plt.plot(x, y2, lw=15, color='r')
plt.xlim(-1.2, 1.2)
plt.title("Happy Mother's Day")
ftext = 'x = np.arange(-1,1.001,0.001)'\
'\ny1 = (x**2)**(1.0/3) + np.sqrt(1-x**2) '\
'\ny2 = (x**2)**(1.0/3) - np.sqrt(1-x**2)'\
'\n\n\n[inspired by a MATLAB impl. by TU Delft]'
plt.figtext(.32,.45, ftext, fontsize=11, ha='left')
plt.show()
[Source: Equation was adopted from a MATLAB implementation by researches from Delft University of Technology]