Written by Yair Mau. Check out my webpage for more tutorials: http://www.yairmau.com/

In [33]:
%matplotlib inline

import matplotlib.pyplot as plt
import numpy as np
fig=plt.figure(1, (5, 5))

fig.subplots_adjust(left=0.0, right=1.0, top=1.0, bottom=0.0,
                    hspace=0, wspace=0)
ax = plt.Axes(fig, [0., 0., 1., 1.])
fig.add_axes(ax)
ax.set_axis_off()

x=np.linspace(0.0, 1, 1001)
a = 0.3
y = lambda x: (1.0 - a) * np.sqrt(x) + a

c1 = '#00665c'  # bottom right
c2 = '#1be2ce'  # top left
ax.fill_between(x, y(x), y2=0, facecolor=c1,
                edgecolor='None') # bottom right
ax.fill_between(x, y(x), y2=1, facecolor=c2,
                edgecolor=c2) # top left

# ax.text(0.1, 0.8, "#a79c69", color="white", fontsize=20)
# ax.text(0.4, 0.2, "#43523a", color="white", fontsize=20)

fig.savefig("./site-logo.png", resolution=300, transparent=True)
plt.show()