plt.rcParams["lines.linewidth"] = 10
plt.figure()
plt.plot(x, np.sin(x), label="zorder=10", zorder=10) // on top
plt.plot(x, np.sin(1.1*x), label="zorder=1", zorder=1) // bottom
plt.plot(x, np.sin(1.2*x), label="zorder=3", zorder=3)
plt.axhline(0, label="zorder=2", color="grey", zorder=2)
plt.title("Custom order of elements")
After Change
import matplotlib.pyplot as plt
import numpy as np
r = np.linspace(0.3, 1, 30)
theta = np.linspace(0, 4*np.pi, 30)
x = r * np.sin(theta)
y = r * np.cos(theta)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// The following example contains a `.Line2D` created by `~.axes.Axes.plot()`