October 2018
Beginner to intermediate
676 pages
18h 30m
English
Let's take a real-life example of using the combination of a text box and mathematical symbols.
Let's generate random numbers for a normal distribution and plot a histogram. Then let's embed the descriptive statistics of this histogram as a text box on the plot. The following code block does this for us:
import numpy as npimport matplotlib.pyplot as pltfrom scipy.stats import kurtosis, skew
np.random.seed(19681211)fig, ax = plt.subplots(figsize=(8,5))
x = np.random.normal(25, 5, 25000)mu = x.mean()median = np.median(x)sigma ...
Read now
Unlock full access