Setting up Python environment consists of 4 main elements
We will go with Python Anaconda distribution for our course because it has really comprehensive in terms of 3rd party packages and it is really powerful with it's own package manager; conda
.
Installing Anaconda is straightforward: download the binary and follow the instructions. But careful to install Python 3.5 version.
If you are asked during the installation process whether you’d like to make Anaconda your default Python installation, say yes
the conda
command is a tool that keep your packages organized and up to date.
Jupyter notebooks provide a browser-based interface to Python with:
Demonstration Starts
It's the main page when you hit http://localhost:8888/ .
In [1]:
import numpy as np
import matplotlib.pyplot as plt
N = 20
theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
radii = 10 * np.random.rand(N)
width = np.pi / 4 * np.random.rand(N)
ax = plt.subplot(111, polar=True)
bars = ax.bar(theta, radii, width=width, bottom=0.0)
# Use custom colors and opacity
for r, bar in zip(radii, bars):
bar.set_facecolor(plt.cm.jet(r / 10.))
bar.set_alpha(0.5)
plt.show()