Example matplotlib imagesΒΆ
import matplotlib.pyplot as plt
import numpy as np
rng = np.random.default_rng()
plt.rcParams["font.size"] = 14
_, ax = plt.subplots(figsize=(3, 3))
ax.set_title("Figure title")
ax.set_ylabel("Dependent variable")
ax.set_xlabel("Independent variable")
ax.plot([0, 1, 2, 3], [1, 2, 1, 3]);
_, ax = plt.subplots(figsize=(3, 10))
ax.set_title("Figure title")
ax.set_ylabel("Dependent variable")
ax.set_xlabel("Independent variable")
ax.plot([0, 1, 2, 3], [1, 2, 1, 3]);
_, ax = plt.subplots(figsize=(10, 3))
ax.set_title("Figure title")
ax.set_ylabel("Dependent variable")
ax.set_xlabel("Independent variable")
ax.plot([0, 1, 2, 3], [1, 2, 1, 3]);
fig, axes = plt.subplots(5, 3, figsize=(32, 22))
for ax in axes.ravel():
ax.set_ylabel("Dependent variable")
ax.set_xlabel("Independent variable")
ax.plot(rng.normal(size=4), rng.normal(size=4))
fig.suptitle("Figure title");
_, ax = plt.subplots(figsize=(12, 12))
ax.set_title("Figure title")
ax.set_ylabel("Dependent variable")
ax.set_xlabel("Independent variable")
ax.plot([0, 1, 2, 3], [1, 2, 1, 3]);
_, ax = plt.subplots(figsize=(15, 10))
ax.set_title("Figure title")
ax.set_ylabel("Dependent variable")
ax.set_xlabel("Independent variable")
ax.plot([0, 1, 2, 3], [1, 2, 1, 3]);