Hinweis
Gehen Sie zum Ende, um den vollständigen Beispielcode herunterzuladen.
Solarized Light Stylesheet#
Dies zeigt ein Beispiel für den Stil "Solarized_Light", der versucht, die Stile von zu replizieren
und die Arbeit von
unter Verwendung aller 8 Akzente der Farbpalette – beginnend mit Blau
Noch zu tun
Erstellen Sie Alpha-Werte für Balken- und gestapelte Diagramme. .33 oder .5
Layout-Regeln anwenden

import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
x = np.linspace(0, 10)
with plt.style.context('Solarize_Light2'):
plt.plot(x, np.sin(x) + x + np.random.randn(50))
plt.plot(x, np.sin(x) + 2 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 3 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 4 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 5 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 6 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 7 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 8 * x + np.random.randn(50))
# Number of accent colors in the color scheme
plt.title('8 Random Lines - Line')
plt.xlabel('x label', fontsize=14)
plt.ylabel('y label', fontsize=14)
plt.show()