What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-25 13:01:03
animate time series python
import numpy as np import matplotlib.pyplot as plt from matplotlib import animation dt = 0.01 tfinal = 1 x0 = 0 sqrtdt = np.sqrt(dt) n = int(tfinal/dt) xtraj = np.zeros(n+1, float) trange = np.linspace(start=0,stop=tfinal ,num=n+1) xtraj[0] = x0 for i ... Add solution -
Python 2021-09-21 03:02:02
how to make a scatter plot matrix iris flower dataset
import matplotlib.pyplot as plt from sklearn.datasets import load_iris import numpy as np #setting the shape of the figure in one line as opposed to creating 12 variables fig, subs = plt.subplots(4,3) #code given in Hyperion notes iris = load_iris() d... Add solution -
Python 2021-09-07 18:58:03
Grouped bar chart with labels
fig, ax = plt.subplots(figsize=(12, 8)) x = np.arange(len(df.job.unique())) # Define bar width. We'll use this to offset the second bar. bar_width = 0.4 # Note we add the `width` parameter now which sets the width of each bar. b1 = ax.bar(x, df.loc[df['... Add solution