Note
Go to the end to download the full example code.
Dark Mode RenderingΒΆ
The dark preset is tuned for dashboards, presentations, and terminal UIs
with carefully softened grays and gridlines to prevent eye strain,
instead of naively inverting all colors.

import matplotlib.pyplot as plt
import numpy as np
import dartwork_mpl as dm
dm.style.use("dark")
fig, ax = plt.subplots(figsize=(dm.SW, dm.SW * 0.7))
np.random.seed(42)
x = np.random.randn(300)
y = x + np.random.randn(300) * 0.6
ax.scatter(x, y, color="oc.violet6", alpha=0.7, edgecolor="none", s=15)
ax.set_title("Latent Space Distribution")
ax.set_xlabel("Principal Component 1")
ax.set_ylabel("Principal Component 2")
dm.simple_layout(fig)
plt.show()
Total running time of the script: (0 minutes 1.555 seconds)