June 15, 2020 7:53 PM EST
On Github datasciY repo.
to add mybinder badge
environment.yml has to be at root level.
Re-built image, launch takes very long time.
-
# Add Opin in Binder badge.
Used html table to make into a box.
To add black outline around table somehow.
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
%matplotlib inline
# 3D data
def f(x, y):
return np.cos(np.sqrt(x**2 + y**2))
x = np.linspace(-4, 4, 36)
y = np.linspace(-4, 4, 36)
X, Y = np.meshgrid(x, y)
Z = f(X, Y)
# OO Style, set plot
fig = plt.figure()
ax = plt.axes(projection='3d')
ax.contour3D(X, Y, Z, 60, cmap='RdBu')
ax.set(xlabel='X', ylabel='Y', zlabel='Z', title='Contour Plot 3D')
[Text(0.5, 0, 'Z'), Text(0.5, 0, 'Y'), Text(0.5, 0, 'X'), Text(0.5, 0.92, 'Contour Plot 3D')]
# data for 3 histograms, randomly generated
x1 = np.random.normal(0, 0.5, 200)
x2 = np.random.normal(-2, 1, 200)
x3 = np.random.normal(3, 1.6, 200)
plt.style.use('seaborn-whitegrid')
kwargs = dict(histtype='stepfilled', alpha=0.4, density=True, bins=25)
plt.hist(x1, **kwargs)
plt.hist(x2, **kwargs)
plt.hist(x3, **kwargs)
plt.title('Three Histograms')
plt.xlabel('X data')
plt.ylabel('Y count');
!python --version
import datetime as dt
print(dt.date.today())
print(dt.datetime.now())
Python 3.8.3 2020-06-15 2020-06-15 23:53:43.306796