如何在 15 秒内使你的 Matplotlib 图表更美观

使用 plt.style.ggplot()

matplotlib_nicer.py
from matplotlib import pyplot as plt
plt.style.use("ggplot")

之前:

应用 ggplot 样式之前具有默认样式的 Matplotlib 图表之后:应用 ggplot 样式的 Matplotlib 图表


Check out similar posts by category: Python