1. Learn
  2. /
  3. Курси
  4. /
  5. Matplotlib 数据可视化入门

Connected

вправа

在不同样式之间切换

选择一种样式后,会影响之后创建的所有可视化。

在本练习中,您将用两种不同的样式绘制数据。所用数据与第一节课中的天气数据相同:您可以使用 DataFrame seattle_weather 和 DataFrame austin_weather,两者都包含每个月的平均气温记录。

Інструкції 1/2

undefined XP
  • 1

    选择 'ggplot' 样式,使用 plt.subplots 创建一个名为 fig 的新 Figure 和一个名为 ax 的新 Axes 对象。

  • 2

    选择 'Solarize_Light2' 样式,使用 plt.subplots 创建一个名为 fig 的新 Figure 和一个名为 ax 的新 Axes 对象。