November 2018
Beginner to intermediate
214 pages
5h 2m
English
We will start by importing numpy, matplotlib, and pyplot, as follows:
import numpy as npimport matplotlib as mplimport matplotlib.pyplot as plt
We will also import matplotlib and also import a couple of extra lines to make our plots show up in a proper format:
%matplotlib inline# Set up figure size and DPI for screen demoplt.rcParams['figure.figsize'] = (6,4)plt.rcParams['figure.dpi'] = 150from scipy.ndimage.filters import gaussian_filterplt.subplot(221)plt.text(0.5, 0.5, 'hello')plt.plot(np.arange(0,1,0.01), np.power(np.arange(0,1,0.01), 3))plt.ylabel('Axis Label')plt.subplot(222)plt.scatter(np.random.normal(size=10), np.random.normal(size=10), c=np.random.normal(size=10))plt.subplot(223)plt.hist(np.random.normal(size=1000)); ...Read now
Unlock full access