fill_between_extras

fill_between_extras(self, *args, **kwargs)[source]

Support overlaying and stacking successive columns of data, and permits using different colors for “negative” and “positive” regions.

Important

This function wraps fill_between and area.

Parameters
  • *args ((y1,), (x, y1), or (x, y1, y2)) – The x and y coordinates. If x is not provided, it will be inferred from y1. If y1 and y2 are provided, this function will shade between these points. If y1 or y2 are 2D, this function is called with each column. The default value for y2 is 0.

  • stack, stacked (bool, optional) – Whether to “stack” successive columns of the y1 array. If this is True and y2 was provided, it will be ignored.

  • negpos (bool, optional) – Whether to shade where y1 >= y2 with poscolor and where y1 < y2 with negcolor. For example, to shade positive values red and negative values blue, simply use ax.fill_between(x, y, negpos=True).

  • negcolor, poscolor (color-spec, optional) – Colors to use for the negative and positive shaded regions. Ignored if negpos is False. Defaults are rc.negcolor = 'blue7' and rc.poscolor = 'red7'.

  • where (ndarray, optional) – Boolean ndarray mask for points you want to shade. See this example.

  • lw, linewidth (float, optional) – The edge width for the area patches.

  • edgecolor (color-spec, optional) – The edge color for the area patches.

Other Parameters

**kwargs – Passed to fill_between.