Jekyll埋め込み用のサンプル

初期設定


In [7]:
# インラインにグラフ描画
%matplotlib inline 
# 解像度を高める
%config InlineBackend.figure_format = 'retina'

In [1]:
import numpy as np
import matplotlib.pyplot as plt

人工データ生成


In [13]:
x = np.random.rand(100) * np.pi
y = np.sin(x) + np.random.rand(100)*.5

In [14]:
plt.plot(x, y, 'o', alpha=.5)


Out[14]:
[<matplotlib.lines.Line2D at 0x11f3c3f60>]