maxframe.dataframe.Series.plot.area#

Series.plot.area(*args, **kwargs)#

绘制堆叠面积图。

面积图以可视化方式显示定量数据。此函数封装了 matplotlib 的 area 函数。

参数:
  • x (label or position, optional) -- X 轴的坐标。默认使用索引。

  • y (label or position, optional) -- 要绘制的列。默认使用所有列。

  • stacked (bool, default True) -- 面积图默认是堆叠的。设置为 False 可创建非堆叠图。

  • **kwargs -- 其他关键字参数请参见 DataFrame.plot()

返回:

面积图,如果 subplots 为 True,则返回面积图数组。

返回类型:

matplotlib.axes.Axes or numpy.ndarray

参见

DataFrame.plot

Make plots of DataFrame using matplotlib.

示例

根据基本业务指标绘制面积图:

(Source code)

面积图默认是堆叠的。要生成非堆叠图,请传递 stacked=False

(Source code)

为单个列绘制面积图:

(Source code)

使用不同的 x 绘图:

(Source code)