電子學考試解答

Sunday, December 10, 2017

Testing: Embedding iPython Notebook on Blogger

這是一個簡單的jupyter notebook範例,寫中文也可以,也支援LaTeX語法。 $$F(\omega) = \int^{\infty}_{0}f(t)e^{j\omega t}dt $$

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

# Make some fake data.
a = b = np.arange(0, 3, .02)
c = np.exp(a)
d = c[::-1]

# Create plots with pre-defined labels.
fig, ax = plt.subplots()
ax.plot(a, c, 'k--', label='Model length')
ax.plot(a, d, 'k:', label='Data length')
ax.plot(a, c + d, 'k', label='Total message length')

legend = ax.legend(loc='upper center', shadow=True, fontsize='x-large')

# Put a nicer background color on the legend.
legend.get_frame().set_facecolor('#00FFCC')

plt.show()

也可以寫腳本,可以畫圖。